C Program Pattern4

 #include<stdio.h>

#include<conio.h>


void main()

{

int i, j, no;

clrscr();


printf("Enter number: ");

scanf("%d", &no);


for(i=1; i<=no; i++)

{

for(j=i; j<=no; j++)

{

printf("%d", j);

}

printf("\n");

}


getch();

}


/*


Output:


Enter number: 5

12345

2345

345

45

5


Enter number: 9

123456789

23456789

3456789

456789

56789

6789

789

89

9


*/


No comments:

Post a Comment