Here is source code of the C program for 7 Number Pattern Programs in C Programming. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
Program 1 :
#include<stdio.h>
int main()
{
int i,j, k=1;
for(i=1;i<=5;i++)
{
for(j=1;j<i;j++)
{
printf("%d ",k);
k++;
}
printf("\n");
}
return 0;
}
Output :
1
2 3
4 5 6
7 8 9 10
Process returned 0
Program 2 :
#include<stdio.h>
int main()
{
int i, j;
for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",i);
}
printf("\n");
}
return 0;
}
Enter any number (1-10): 6
1
232
34543
4567654
567898765
67891011109876
Process returned 0
Above is the source code for C program for 7 Number Pattern Programs in C Programming which is successfully compiled and run on Windows System.The Output of the program is shown above .
Here is source code of the C program for 7 Number Pattern Programs in C Programming. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
Program 1 :
Output :
Program 2 :
Output :
Program 3 :
Output :
Program 4 :
Output :
Program 5 :
Output :
Program 6 :
Output :
Program 7 :
Output :
Above is the source code for C program for 7 Number Pattern Programs in C Programming which is successfully compiled and run on Windows System.The Output of the program is shown above .
need an explanation for this answer? contact us directly to get an explanation for this answer