Write a program to print the numbers in the following format using loops
/*program to print numbers in the following format using loops.
Programmed by : kiran shrestha
Roll no. : 10121
Programmed on : 7th feb, 2011*/
#include <stdio.h>
#include <conio.h>
main ()
{
int i,j;
int a=1;
for (i=1;i<=5;i++)
{
for (j=a;j<=a+2;j++)
{
printf (“%d\t”,j);
}
for (j=a+1;j>=a;j–)
{
printf (“%d\t”,j);
}
a=a+3;
printf (“\n”);
}
getch();
}
output
1 2 3 2 1
4 5 6 5 4
7 8 9 8 7
10 11 12 11 10
13 14 15 14 13








