Tuesday, October 4, 2011

Pattern 1



Write a program to print the following pattern:
(1,1)  (1,2)  (1,3)
(3,1)  (3,2)  (3,3)
(5,1)  (5,2)  (5,3)

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
for(i=1;i<6;i++)
{
for(j=1;j<4;j++)
{
if(i==2 || i==4)
continue;
printf("(%d,%d)\t",i,j);
}
printf("\n");
}
getch();
}


Output:

 

1 comments:

haizellwaag said...

Best 8 Casinos in San Francisco (Google Maps) - Mapyro
Find out 보령 출장샵 more 속초 출장마사지 about the 8 casino locations, casinos 전라북도 출장마사지 and restaurants near you. Find 경기도 출장마사지 addresses, read 아산 출장마사지 reviews and more.

Post a Comment

About Me