/*WAP to shap3*/
#include<stdio.h> #include<conio.h> void main() { int i,j; clrscr(); //clear screen for(i=5;i>=1;i--) //loop starts from n for row { for(j=1;j<=i;j++) // loop executes i times for colom printf("%d",j); // print j printf("\n"); // goto next line } getch(); }
No comments:
Post a Comment