Reply

Join Date: Mar 2009
Posts: 1
Reputation: naveuye is an unknown quantity at this point 
Solved Threads: 0
naveuye naveuye is offline Offline
Newbie Poster

shapes in C++

 
0
  #1
Mar 19th, 2009
Hi all,

i m new to the programming storie,

can any one please help me? i want to write a program that allows the user to input the diamention (e.g heit, weight) used to draw the object shape. the program should then compute the area and display the shape based on the inputed diamention.

some how i must use header files.

here is what i have tried so far:

#include <graphics.h>
#include<iostream.h>
#include<stdlib.h>
#include<conio.h>

#include "MyHeader.h";

void main ()
{

int gd=DETECT, gm;
initgraph (&gd, &gm, "c:\\tc\\bgi");
int err=graphresult();
if (err !=grOk)

{
cout<<"graphics not initialised";
return;
}

fillsettingstype f;
getfillsettings (&f);

cout<<"Which shape are you working with"<<endl;
cin>>'1' || '2' || '3';

if (cin == 1)
{


circle();
}

return 0;

}

void circle ( int x, int y, int z)

{
int color, area;
setcolor(LIGHTGREEN);
cout<<"enter your circle cordinates:";
cin>> x, y, z;
getch();
closegraph();
}
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1,295
Reputation: sittas87 is on a distinguished road 
Solved Threads: 41
sittas87 sittas87 is offline Offline
Nearly a Posting Virtuoso

Re: shapes in C++

 
0
  #2
Mar 20th, 2009
welcome

nyc code.
"Live as if you were to die tomorrow. Learn as if you were to live forever" Mahatma Gandhi
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Community Introductions Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC