Help!! Program that can display the following pattern
Help!! Program that can display the following pattern
guys plz help me on this.........
i need a program that can display the follwing pattern
* ** *** ****
where *=n, and n is to be accepted from user. if n=5 Input=5 then the stars should displayed till * ** *** **** ***** Thanks in ADVANCEEEEEEEEEEE :D27 Sep 07, 9:14AM
#include <stdio.h> void triangle(int N) { for(int i=0;i<N;i++) { putchar('\n'); for(j=0;j<i;j++) putchar('*'); } } int main() { triangle(5); }
That should do it. I'm sure you can figure out how to get user input for the numer N. Try scanf!
W15 Oct 07, 9:01AM
hey thanks will!!
Will i will try it out :wink: :D
Login