Tuesday, December 4, 2012

Pattern Program Using C Language




The following pattern is displayed using C programming language. 



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

No comments:

Post a Comment

Subscribe via email

Enter your email address:

Delivered by FeedBurner