About Me

My photo
Raipur, Chhattisgarh, India
Hi , I am Amit Thakur. I have worked as a QA Engineer for two years and as a Java Developer for one year in NIHILENT TECHNOLOGIES PVT. LTD., Pune.Currently I am working as DEAN (Research & Development) in Bhilai Institute of Technology, Raipur.

Tuesday, September 3, 2013

C Program to Print Even Number Pyramid

Even Number Pyramid :Generate the Following Pattern of Pyramid ?

2
2  4
2  4  6
2  4  6  8

Program :
#include
#include

void main()
{
int i,j,num=2;
clrscr();
for(i=0;i<4 d="" for="" getch="" i="" j="0;j<=i;j++)" n="" num="num+2;" pre="" printf="" t="">

2 comments:

Unknown said...

/*4.
Even Number Pyramid :Generate the Following Pattern of Pyramid
2 4
2 4 6
2 4 6 8
*/
#include
#include
int main()
{
int i,j,n;
printf("\n\t\t");
for(i=1;i<4;i++)
{
n=2;
for(j=0;j<=i;j++)
{
printf("%d ",n);
n+=2;
}
printf("\n\t\t");
}
getch();
return 0;
}

Unknown said...

/*4.
Even Number Pyramid :Generate the Following Pattern of Pyramid
2 4
2 4 6
2 4 6 8
*/
#include
#include
int main()
{
int i,j,n;
printf("\n\t\t");
for(i=1;i<4;i++)
{
n=2;
for(j=0;j<=i;j++)
{
printf("%d ",n);
n+=2;
}
printf("\n\t\t");
}
getch();
return 0;
}