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

welcome

nyc code.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.