1
2 3
4 5 6
7 8 9 10
provide code for this program..............
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Khaja MoizuddinPosted Dec 18, 2016, 11:53 AM
Amit Kumar SinghPosted Dec 18, 2016, 7:58 AM
int main()
{
int num,r,c,sp,i=1;
printf("Enter any number : ");
scanf("%d", &num);
for(r=1; r<=num; r++)
{
for(sp=1; sp<=num-r; sp++)
printf(" ");
for(c=1; c<=r; c++,i++)
printf("%d ",i);
printf("\n");
}
return 0;
}