Write the program to print following patterns
/*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++)
{
if(j%i!=0)
printf (“%d\t”,0);
else
printf (“%d\t”,1);
}
printf (“\n”);
}
getch();
}
output
1
01
101
0101
10101








