CODE :-
#include<stdio.h> int main() { int i, j, k, num, n; printf("\nEnter a number: "); scanf("%d",&num); printf("\n"); n = num; for(i = 0; i < num; i++) { for(k = 0; k < i+1; k++) { printf(" "); } for(j = 0; j < num; j++) { printf("*"); } printf("\n"); } return 0; }
No comments:
Write Comments