adsense

Hii, welcome to my site. My name is Om prakash kartik. This blog helps you to learn programming languages concepts.

Print following pattern

54321
4321
321
21
1


 #include<stdio.h>  
 #include<conio.h>  
  void main()  
   {  
   int i,j; 
   clrscr(); 
   for(i=5;i>=1;i--)  
    {  
     for(j=i;j>=1;j--)  
         printf("%2d",j);  
         printf("\n");  
       }  
   getch();  
   }    
Output:-

Post a Comment

0 Comments