/* Program to draw pyramid of numbers displaying following Pattern */
/* 1
2 3
4 5 6
7 8 9 10 */
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,row,t=1;
clrscr();
printf(“Enter How many Rows : “);
scanf(“%d”,&row);
for(i=1;i<=row;i++)
{
for(j=1;j<=row-i;j++)
printf(” “);
for(j=1;j<=i;j++)
printf(“%2d”,t++);
printf(“\n”);
}
getch();
}
Latest posts by Mohit Arora (see all)
- MongoDB Operators Tutorial – What are Different Operators Available? - October 5, 2019
- MongoDB Projection Tutorial : Return Specific Fields From Query - March 9, 2019
- MongoDB Index Tutorial – Create Index & MongoDB Index Types - July 6, 2018
Kinda late, but thank you 😉
Hi there, i read your blog fom time to time and i own a similar one and i was just wondering if you
get a lot off spam remarks? If so how do you prevent
it, any plugin or anything you can suggest? I get
so much lately it’s driving me crazy so any assistance is very much appreciated.