Thursday , September 21 2017
Home / C / Program in C to Draw a Pyramid

Program in C to Draw a Pyramid

#include
#include
#include
void main()
{
int gd=DETECT,gm;
initgraph(&gd,&gm,”c:\\tc\\bgi”);
setcolor(150);
line(100,150,300,150);
line(100,150,100,300);
line(100,300,300,300);
line(300,300,300,150);
line(100,150,200,0);
line(300,150,200,0);
line(100,300,200,0);
line(300,300,200,0);
getch();
closegraph();
}
 

OUTPUT:

 
 
Tags: c program to draw a pyramid, c graphics program to draw a pyramid.

Check Also

How to Solve Linear Equation in One Variable In C Programming?

C Program to Solve any Linear Equation in One Variable Find complete C program to ...

Leave a Reply

Your email address will not be published. Required fields are marked *