This assignment has two parts both of which must be within a
Solution
#include <iostream> // std::cout
#include <stack> // std::stack
#include <vector> // std::vector
#include <deque> // std::deque
using namespace std;
#include <string>
int main(int argc, char const *argv[])
{
int type;
cout << \"enter choice : \";
cin >> type;
double radius;
double length, width;
double base, height;
if(type == 1){
cout << \"enter radius of circle : \" ;
cin >> radius;
cout << 3.14*radius*radius << \" is the area of circle \" << endl;
}else{
if(type == 2){
cout << \"enter length and width of rectangle : \" << endl ;
cin >> length;
cin >> width;
cout << 3.14*radius*radius << \" is the area of circle\" << endl;
}else{
if (type == 3)
{
cout << \"enter base, height of triangle \" << endl ;
cin >> base;
cin >> height;
cout << 0.5*base*height << \" is the area of triangle\" << endl;
}else{
if(type == 4){
return 0;
}else{
}
}
}
}
// second part
string name;
cout << \"enter name :\" ;
cin >> name;
cout << \"enter height :\" ;
cin >> height;
cout << name << \" \" << (int)height << endl;
return 0;
}

