0

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();
}

Edited by Dani: Formatting fixed

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by sittas87
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.