1 Attachment(s)
ahh need massive help with this C++ program dealing with calculation of volume/area
Write a program that calculates area/volume of various shapes.
1st call function w/ prototype: void showMenu(int &); which displays menu
this is what the output should be:
Attachment 12599
this is what i have so far... yeah, fairly lost
// This program is designed to allow the user to calculate the area and volume of various shapes.
#include <iostream>
#include <iomanip>
using namespace std;
void showMenu (int &);
double area (double length, double width);
double area (double radius);
double volume (double length, double width, double height);
double volume (double radius);
int main()
{
int selection;
double length;
double width;
double height;
double radius;
cout << fixed << showpoint << setprecision(2);
cout << "1. Calculate the area of a rectangle" << endl;
cout << "2. Calculate the area of a circle" << endl;
cout << "3. Calculate the volume of a box" << endl;
cout << "4. Calculate the volume of a sphere" << endl;
cout << "5. Quit" << endl;
cin >> "Please select 1-5: " >> selection;
cout << endl;