Program : Number Pyramid in C Programming
Program :
#include<stdio.h> #include<conio.h> void main() { int i,j; int num; clrscr(); printf("\nEnter the number of Digits :"); scanf("%d",&num); for(i=0;i<=num;i++) { for(j=0;j<i;j++) printf("%d ",i); printf("\n"); } getch(); }
Output :
Enter the number of Digits : 5 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5


how to make a pyramid like this one??
2
2 4
2 4 6
2 4 6 8
please help me out with this one ....... my email id is kushalparikh28oct@gmail.com....
if any1 have the ans plz mail me
#include
#include
void main()
{
int i,j,num=2;
clrscr();
for(i=0;i<4;i++)
{
num=2;
for(j=0;j<=i;j++)
{
printf("%d\t",num);
num = num+2;
}
printf("\n");
}
getch();
}