Answers

2015-08-15T20:34:22+05:30
Just Like a Syntax :Develop on your own as you like

int b,h,r,s,areat,areac,areas;                           //Global Variables

int area(int b,int h){
int areat;
areat=(b*h)/2;
return(areat);}

float area(int r){
float areac;
areac=3.14*r*r;
return(areac);}

int area(int s,int t=0,int u=0){
int areas;
areas=s*s;
return(areas);}

void main(){
int ch;
cout<<"Enter 1.Triangle 2.Circle 3.Square";
cin>>ch;
switch(ch){
case 1: cout<<"Enter Base and Height:";
          cin>>b>>h;
          cout<<area(b,h);
break;
case 2:cout<<"Enter Radius:";
          cin>>r;
          cout<<area(r)
break;
case 3:cout<<"Enter Side:";
          cin>>s;
         cout<<area(s,0,0);
break;
default: cout<<"Enter a Valid Choice";
}
0