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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit Kumar SinghRank #562 · 4.3K reputationPosted Dec 18, 2016, 2:58 AM EST
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;
}
Khaja MoizuddinRank #270 · 9.4K reputationPosted Dec 18, 2016, 6:53 AM EST