+ 1
pattern of numbers
Write a program to print the following output using (for loop) in c. 1 23 456 78910
3 odpowiedzi
+ 1
Post your work so we can help you
+ 1
#include <stdio.h>
#include<conio.h>
void main()
{
int r, sp, p, no=4,n;
/*to print the pyramid in center, you can also increase the # of spaces*/
n=no;
for (r=1;r<=4;r++)
{
for (sp=1;sp<=4;sp++)
{
printf(" ");
}n--;
for (p=1;p<=r;p++)
{
printf("%d ",r);
}
printf("\n");
}
getch();
}
0
For next times save your codes on appropriate section (they will run also) and post link in discussion... Anyway this is my edited code:
https://code.sololearn.com/c066ZWNeTIS5/?ref=app
If you dont understand something tell