Back To C Loops Index
//program to print pattern of stars using for statement (example of nested for loop) #include
#include
void main() { int i,j; clrscr(); for(i=1;i<=5;i++) { for(j=1;j<=i;j++) { printf("*"); } printf("\n"); } getch(); }