#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!
W
Login