answersLogoWhite

0


Best Answer

int main()

{

int gd = DETECT, gm;

int midx, midy;

initgraph(&gd, &gm, "C:\TC\BGI");

setcolor(MAGENTA);

rectangle(0,40,639,450);

settextstyle(SANS_SERIF_FONT,HORIZ_DIR,2);

setcolor(WHITE);

outtextxy(275,10,"Pie Chart");

midx = getmaxx()/2;

midy = getmaxy()/2;

setfillstyle(LINE_FILL,BLUE);

pieslice(midx, midy, 0, 75, 100);

outtextxy(midx+100, midy - 75, "20.83%");

setfillstyle(XHATCH_FILL,RED);

pieslice(midx, midy, 75, 225, 100);

outtextxy(midx-175, midy - 75, "41.67%");

setfillstyle(WIDE_DOT_FILL,GREEN);

pieslice(midx, midy, 225, 360, 100);

outtextxy(midx+75, midy + 75, "37.50%");

getch();

return 0;

}

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a C program to draw a pie chart?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Where can you find a sample program to draw a pie chart in a C program?

in BGIDEMO.C, part of TurboC


How do you draw a pie chart?

use Excel


How do you draw a pie chart with accuracy?

you use a protractor


What tool can be used to draw a circle graph?

A Compass - Pie Chart


How do you make a pie graph chart?

Microsoft Excel program enables you to create pie charts.


Draw a pie chart with given information?

I'd have to know the given information


What is the division of the pie chart?

Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.Each division of a pie chart is known as a slice.


How do you write an algorithm and draw a flow chart to find the area of a circle?

start read pie area circum print area print circum stop


Which type of chart is best for charting data that is a percentage of a whole?

a pie a pie chart compares from a whole known and 100.


How do you make a pie chart?

A pie chart is based on percentages, where each slice of the pie represents the percentage of the entire pie, adding up 100% total. A pie chart can be drawn using a pen and paper. first make a circle then draw little triangles that make up ur percent the bigger the percewnt the bigger the slice the smaller the percent the smaller the slice


Which chart type is used to show the relationship or proportion of parts to a whole?

This is usually conveyed using a pie chart.


Why pie chart is names so?

A pie chart is called that because it shaped as a pie. It also called a circle chart.