954,219 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

c++ nesting loops

i need some help in understanding to write the following programs.please describe how you think of doing it..
1)
*
**
***
****
*****
******
*******

2)*******
******
*****
****
***
**
*

thank you.....

kalinga
Newbie Poster
7 posts since Aug 2004
Reputation Points: 11
Solved Threads: 0
 

Looks like
draw 1 star
draw 2 stars
draw 3 stars
etc.

that sounds like a 'for' loop to me, or maybe a 'while' loop.

Can you think of a for loop that would do this?

Chainsaw
Posting Pro in Training
436 posts since Jun 2004
Reputation Points: 36
Solved Threads: 11
 

Got any more info, K?? :)

Like, is that supposed to be the program output, or some model of the code?

If the former, it sounds like Chainsaw's on the right track.

mph
Newbie Poster
2 posts since Aug 2004
Reputation Points: 11
Solved Threads: 0
 

content removed by alc6379. We don't do homework problems here for you-- especially not simple ones.

rishiraj_bayerd
Newbie Poster
16 posts since Jul 2004
Reputation Points: 13
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You