cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
pyramid
pyramid
Feb 11, 2009 at 8:15am UTC
emraan
(1)
i dont know how to make a pyramid of stars.....
*
***
*****
Last edited on
Feb 11, 2009 at 8:17am UTC
Feb 11, 2009 at 8:33am UTC
harryp
(16)
It's easy.
U jst have to use a nested for-loop structure for this
(one for rows other for columns)
:
for(int r=1;r<x;r++) //x is size of triangle
{ for(int c=0;c<r;c++)
cout<<"*";
cout<<endl;
}
Last edited on
Feb 11, 2009 at 8:34am UTC
Topic archived. No new replies allowed.