Professional Documents
Culture Documents
area of circle "; cout<<"2. area of rectangle"; cout<<"3. area of triangle"; cin>>n; switch(n) { case 1: cout<<"Enter the radius:"; cin>>r; area=(3.14*r*r); cout<<"Area of the circle"<<area; break; case 2: cout<<"Enter the length:"; cin>>l; cout<<"Enter the breadth": cin<<b; area=l*b; cout<<"Area of the rectangle"<<area; break; case 3: cout<<" enter the three sides of triangle:"; cin>>a>>b>>c; s=(a+b+c)/2; area= sqrt(s*(s-a)*(s-b)*(s-c)); break; default: cout<<" you have entered a wrong choice!!!!!!!!!!!!!!!!"; break; } getch(); }