I have this program i need help with. i have to make a program that will display this.
000000*
00000***
0000*****
000*******
00*********
0***********
*************
//dont display the zeros.
using only one cout<<"*"; one cout" "; and use no tabs. any help would be great!
Im studying loops and i have
and the output is this:Code:#include <iostream> using namespace std; int main() { int r,s,spl,space; spl = 7; for(r = 1;r <= 7;r++) { for(space = 2;space <= spl;space++) { cout<<" "; } for(s = spl;s <= 7;s++) { cout<<"*"; } spl--; cout<<endl; } cin.ignore(2); return 0; }
000000*
00000**
0000***
000****
00*****
0******
*******
//agian for get the 0's