Can't get the programme to work!! someone help please???

include <stdio.h>
#include <math.h>
# include <conio.h>
# include <dos.h>

#define PI 3.14159265

void goodbye();
float areaTriangle(float,float);
float areaCircle(float);


int main(void)
{
return0;
}

{
float baseTriangle, heightTriangle;
float radiusCircle;
float lengthA, lengthB;
float area;
char option;

clrscr();
{
printf("\n\n\t Enter your option: ");
printf("\n\n\tExit\t : Press 0");
printf("\n\n\tTriangle: Press 1");
printf("\n\n\tCircle: Press 2");


printf("\n\n\n\tYour option: ");

option = getche();
clrscr();

{

case '0' :
printf("\n\n\");

printf("\n\n\n MAIN MENU\t : press 1")
printf("\n EXIT\t : Press any key");

printf("\n\n\n\tYour option: ");
option = getche();

if(option != '1')
{
clrscr();
goodbye();
}

clrscr();

break;


case '1':

printf("\nEnter the length of rectangle: ");
scanf("%f",&lengthRectangle);

printf("\nEnter the width of rectangle: ");
scanf("%f",&widthRectangle);

area = areaRectangle(lengthRectangle,widthRectangle);
printf("\n\nSo, the area of Rectangle is: %f",area);

break;

case '2':

printf("\nEnter the radius of Circle: ");
scanf("%f",&radiusCircle);
area = areaCircle(radiusCircle);
printf("\n\nSo, the area of Circle is: %f",area);

break;

default:
printf("\n\nSorry! Invalid Request! try again! ");
delay(2500);
clrscr();

break;

}


printf("\n\n\n\n\n");


}while(1);


}

void goodbye()
{ printf("\n\nGOODBYE!");
delay(2500);
exit(0);}

float areaRectangle(float l,float w)
{
float areaR;
areaR = l * w;
return areaR;}


float areaCircle(float r)
{
float areaC;
areaC = 2 * PI * r * r;
return areaC;}



















a) Use CODE tags please. Makes it easier for us to read.
b) Only read the first few lines, but you have this:
1
2
3
4
5
6
int main(void)
{
return0;
} // Main quit?

{ // Wild scope bracket?! 

Your main is calling nothing, thus your functions are never called. No wonder it's doing nothing.
I've been doing this like 2 weeks so at the moment it all looks weird to me!

it isn't my programme it was given to us to solve what was wrong with it, yet they assume with 2 weeks knowledge i will be able to make any sense of it :(

What do i change it to to make the main call the correct thing in order to make the functions work??
Topic archived. No new replies allowed.