0

Hello sir, Good afternoon! i am happy to get the help from you. for that thanku very much.
but now i need help in the for loop.

*
* *
* * *
* * * *
* * * * *
here is the picture, i want the coding of this program in c language and want to know
that how is the working of i and j loop. please sir explain in details.
if you will help me, i will be thankful to you for this.

Edited by sharma89bunty: in the post , the picture is looking reversing, code for this picture which i sent you

3
Contributors
2
Replies
4
Views
5 Years
Discussion Span
Last Post by Ancient Dragon
0

We are not here for doing any one's homework. You have to write the code on your own.
However for the logic part there will be two loops i and j
i loop is for row, and j loop is for column.
Hope you know about matrix, just figure out the sample star:-
when i=1 one loop for j; print star
when i=2 two loops for j; print star for every loop of j
when i=3 three loops for j; print star for every loop of j
and so on..
think like this and try to code it..if still you will get error then post your code along with errors , we will definitely help you.

Edited by cse.avinash: n/a

0

You will need two loops, one inside the other. The outer most loop counts the rows, then the innermost loop counts the number of starts to be printed on each row. The innermost loop will count from the 0 up to, and including the value of the outermost loop.

Your assignment I assume is to teach you how to write loops, so I'm not going the give you actual code. Instead, you take your best shot at programming and post your attempt along with specific questions.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.