I am dieing over this project. and whatever i put in doesnt seem to work please help!
//r = rows,s = stars, spl = stars per line
Code:
#include <iostream>
using namespace std;
int main()
{
int r,s,spl,x,space,spacepl;
spl = 7;
spacepl = 7;
for(r = 1;r <= 7;r++)
{
for(space = 1;space < spacepl;space++)
{
cout<<" ";
}
for(s = spl;s <= 7;s++)
{
for(x = spl;x <= 7;x++)
{
cout<<"*";
}
}
spl--;
spacepl--;
cout<<endl;
}
cin.ignore(2);
return 0;
}
and the output for this is:
Code:
*
****
*********
****************
*************************
************************************
*************************************************
please help me.