//WAP TO CALCULATE AREA OF A CIRCLE,A RECTANGLE OR A TRIANGLE
//DEPENDING UPON USER'S CHOICE
#include<iostream.h>
#include<conio.h>
#include<math.h>
void main()
{
	float area,rad,len,bre,a,b,c,s;
	int ch;
	clrscr();
	cout<<"Area Menu\n";
	cout<<"1. Circle\n";
	cout<<"2. Rectangle\n";
	cout<<"3. Triangle\n";
	cout<<"\nEnter your choice";
	cin>>ch;
	cout<<"\n";
	switch(ch)
	{
		case 1: cout<<"Enter radius of the circle :";
			cin>>rad;
			area=3.14 * rad * rad;
			cout<<"\n The Area of the circle is "<<area<<"\n";
			break;
		case 2: cout<<"Enter length and breadth of rectangle :";
			cin>>len>>bre;
			area=len*bre;
			cout<<"\nThe area of rectangle is"<<area<<"\n";
			break;
		case 3: cout<<"Enter three sides of a triangle: ";
			cin>>a>>b>>c;
			s=(a+b+c)/2;
			area=sqrt(s*(s-a)*(s-b)*(s-c));
			cout<<"\nThe Area of the triangle is"<<area<<"\n";
			break;
		default: cout<<"Wrong Choice";
			 break;
	}
	getch();
}
