Write the program to print following patterns 1 using loops
/*program to print numbers in the following using loops.
Programmed by : kiran shrestha
Roll no. : 10121
Programmed on : 7th feb, 2011*/
#include <stdio.h>
#include <conio.h>
void main ()
{
int i,j;
for (i=1;i<=5;i++)
{
for (j=1;j<=i;j++)
{
printf (“%d\t”,i);
}
printf (“\n”);
}
getch();
}
output
1
22
333
4444
55555
Comments (1)