Tuesday, July 14, 2009

Can anyone help me with Turbo C code to plot graph, bar and pie chart?

The program should have a menu, it should read data from a file. The menu will show 1. Plot a graph 2. Bar 3. Pie chart. Please, help me any real programmer. The program should be wrtten in Turbo C and can I have the codes.

Can anyone help me with Turbo C code to plot graph, bar and pie chart?
Last question first, no I won't give you the code. I will try and point you in the right direction to figure it out.





First, setup a function that displays the menu neatly on the screen, use conio.h functions to control the placements. Now, then put a call to the function that will collect and return the user's choice of what to do.


Use a switch / case structure or multiple if statements to redirect the program to the part of the program the user wants.





Once you get this working, then you can write the modules are needed to open, read from and close a file. Once you've proved to yourself you can do that, then you'll have to either store the data read into memory or read it into the graphics module appropriate to the menu choices made.





In Turbo C, the graphic.h file is what you'll need to draw pretty graphics on the screen. It has the functions to manipulate colors, draw lines, circles and even segments of circles.





I hope that this will help you out some. Sorry about the code, but it is too complex and sounds too much like homework. I hope I got you started at least.
Reply:Why do not you consult a C expert? Check http://k.aplis.net/


No comments:

Post a Comment