Q: Print 1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
#include
#include
void main()
{
int i,j,n;
printf("enter value of n:");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("%d",j);
}
printf("\n");
}
getch();
}
This blog is for the struggling programmers who need assitance..
No comments:
Post a Comment