Sunday, December 9, 2012

WAP to print 1234... pattern 31


#include<stdio.h>
#include<conio.h>
void main()
{
int a,n,i,j;
clrscr();


printf("Enter Rows :");
scanf("%d",&a);
printf("Enter Columns: ");
scanf("%d",&n);

for(i=1; i<=a;i++)
{
for(j=1;j<=n;j++)
{
printf("%d",j);
}
printf("\n");
}

getch();
}

No comments:

Post a Comment