jituTechnology

jituTechnology

Write the program to print following patterns 2

Programmed by : kiran shrestha
Roll no. : 10121
Programmed on : 7th feb, 2011*/
#include <stdio.h>
#include <conio.h>
void main ()
{
     int i,j,a=0;
   for (j=1;j<=5;j++)
     {
           for (i=1;i<=5;i++)
                {
                     if(j==i)
                           printf (“%d\t”,a);
                     else
                           printf (“%d\t”,j);
             }
         printf (“\n”);
      }
   getch();
}
output
01111
20222
33033
44404
55550

No comments yet.

Add a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.



Connect with Me

GPO 8973 NPC 541; Kathmandu Nepal
Phone: +977 9851236800

Calendar

September 2025
S M T W T F S
 123456
78910111213
14151617181920
21222324252627
282930