Pattern: 1 12 123 1234 12345
Write a program to print
1
12
123
1234
12345
#include<stdio.h>
main()
{
int i,n,j;
printf("\nEnter the range value:");
scanf("%d",&n);
printf("\nThe pattern is:\n");
for(i=1;i<=n;i++)
{
for(j=1;j<=i;j++)
printf("%d",j);
printf("\n");
}
}
Unck job
ReplyDeletecan u pls explain the code
ReplyDeleteany one can explain this code
ReplyDelete