12341
21432
34123
43214
#include< stdio.h>
void main()
{
int i,j,x;
clrscr();
for(i=0;i< 4;i++)
{
x=i+1;
for(j=0;j< 5;j++)
{
printf("%d",x);
if(i%2==0)
x++;
else
x--;
if(i%2==0 && x>4)
x=1;
else if(i%2!=0 && x<1 span="span">1>
x=4;
}
printf("\n");
}
getch();
}
No comments:
Post a Comment