cout << "Enter in which type you would like:";
cin >> letter; //get a charector ('t' or 's')
cout << endl;
if (letter = 't');
{
cout << "The base: ";
cin >> base; // get the base
cout << endl;
cout << "Enter in the height: ";
cin >> height; // get the height
cout << endl;
triangle = (base*height) / 2;// calculate the triangle area
cout << "The triangle area is : " << triangle; // disp;ay the triangle area
cout << endl;
}
if (letter == 's')
{
cout << "Enter in the side: ";
cin >> side; // get the side of the square
cout << endl;
area = pow(side, 2); // compute the area of a square
cout << "The area is :" << area; // display the area
cout << endl;
}