write pseudocode for the driven program that requests the user to select several shapes. The shapes are CIRCLE, RECTANGLE and TRIANGLE. Then, you will have to request the appropriate inputs and calculate the area of te selected shape. The area for
Then, produce the c++ program code. you will have to use DO...WHILE loop to repeat the program.
#include <iostream>
using namespace std;
int main()
{
char selection;
cout<<"Welcome to Vikramathitan calculator.\n\n";
cout<<"1.CIRCLE\n";
cout<<"2.RECTANGLE\n";
cout<<"3.TRIANGLE\n";
cout<<"4.EXIT\n";
selection:
cout<<"\nChose your option: ";
cin>>selection;
cout<<endl;
switch (selection)
{
int radius, circle, length, width, rectangle, height;
case '1':
cout<<"Please enter the radius of circle: ";
cin>>radius;
circle=3.141593*radius*radius;
cout<<"The area of circle is: "<<circle<<endl;
break;
case '2':
cout<<"Please enter the length of the rectangle: ";
cin>>length;
cout<<"Please enter the width of the rectangle: ";
cin>>width;
rectangle=length*width;
cout<<"The area of rectangle is: "<<rectangle<<endl;
break;
case '3':
cout<<"Please enter the height of the rectangle: ";
cin>>height;
cout<<"Please enter the width of the rectangle: ";
cin>>width;
rectangle=(height*width)/2;
cout<<"The area of triangle is: "<<rectangle<<endl;
break;
case '4':
cout<<"\nThank you for using our application.\n";
break;