#include <iostream> using namespace std; void circle(); void triangle(); void square(); int main() { int choice; cout << "Select the shape you would like to solve for: " << endl; cout << "1. Circle" << endl; cout << "2. Triangle" << endl; cout << "3. Square" << endl; cin >> choice; if (choice == 1) { circle(); } else if(choice == 2) { triangle(); } else if(choice == 3) { square(); } return 0; } void circle() { double area, circumference, radius; const double pi = 3.14; cout << "You have selected: Circle" << endl; cout << "Please enter the radius of the circle: " << endl; cin >> radius; area = pi * radius * radius; circumference = 2 * pi * radius; cout << "The Area of a Circle is: " << area << endl; cout << "The Circumference of a Circle is: " << circumference << endl; } void triangle() { double area, height, base; cout << "You have selected: Triangle" << endl; cout << "Please enter the height of the triangle: " << endl; cin >> height; cout << "Please enter the base of the triangle: " << endl; cin >> base; area = .5 * base * height; cout << "The Area of the Triangle is: " << area << endl; } void square() { double side, area, perimeter; cout << "You have selected: Square" << endl; cout << "Please enter the side of the square: " << endl; cin >> side; area = side * side; perimeter = 4 * side; cout << "The Area of the Square is: " << area << endl; cout << "The Preimeter of the Square is: " << perimeter << endl; }