how do i print such a program in C using for/while/do while loops?

Comments

if you know how to create a for loop then the problem is pretty trivel. Post your best effort and we'll be glad to help you out, but we are not going to do your homework for you. Here is a start.[code]#include

[b][red]This message was edited by chinuchinu at 2006-9-5 7:52:43[/red][/b][hr][b][red]This message was edited by chinuchinu at 2006-9-5 7:52:10[/red][/b][hr]GUYS!i am a beginner and i really dont know how to do this. I know how to print :

**********

but not:|||||*||||* *|||* * *||* * * *

PLEASE NOTICE THE DIFFERENCE.(Ignore the |s) The pattern is important.

: : and you need two loops, not one. The inner loop will print the spaces, the outer loop prints the stars.: : : : Hmm, how could that be done?: : Wouldn't he need 3 loops?: one outer, one that loops the spaces, and one that loops the stars:

you are right -- the outermost loop will count the number of rows (or lines) in the triangle.