Pattern 1:
Discussion:
This code will print 1 star in first row and from next row it increase by 1 to n.
Code:
#include <stdio.h> int main() { int i,j; for(j=0;j<8;j++) { for(i=0;i<=j;i++) { printf("*"); } printf("\n"); } return 0; }
Discussion:
This code will print 1 star in first row and from next row it increase by 1 to n.
#include <stdio.h> int main() { int i,j; for(j=0;j<8;j++) { for(i=0;i<=j;i++) { printf("*"); } printf("\n"); } return 0; }
Post a Comment