Where
I tried a third loop it printed it wrong.
Like this:
Qt Code:
  1. for(t=1;t<12;t++)
  2. {
  3. for(j=1;j<=t;++j)
  4. cout<< " ";
  5. for(n=12;n>t;--n)
  6. cout << "*";
  7. cout <<endl;
  8. }
  9.  
  10. cout<<endl;
To copy to clipboard, switch view to plain text mode