BlueJ and Python For ICSE ISC and CBSE
.
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
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
Subscribe via email
Enter your email address:
Delivered by
FeedBurner
No comments:
Post a Comment