idk what to do with these error messages.. ;/

Mar 4, 2015 at 2:09am
// Michael Molitor, Program1, 3/4/15 //
//This program will be able to have the user choose from the menu and decide which equation to perform.//

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
const double pi = 3.14159;
double radius, height, base, x, y;
double hyp, Ac, Vp, Vs, Vc;
// where hyp is hypotenuse, Ac is area of a circle, Vp is volume of a pyramid, Vs is volume of a sphere, and Vc is volume of a cone. //

int input;
cout << " Choose a number 1-5 based on what you want to calculate.\n.";
cout << " 1.)Calculate Volume of a cone. \n.";
cout << " 2.)Calculate the volume of a sphere. \n.";
cout << " 3.)Calculate the hypotenuse of a right triangle. \n.";
cout << " 4.)Calculate the Volume of a pyranid with a square base. \n.";
cout << " 5.)Calculate the area of a cirle. \n.";
cin >> input;

switch (input)
{

case 1:
cout << " please enter the radius in inches of the cone. \n.";
cin >> radius;

cout << "please enter the height of the cone in inches \n.";
cin >> height;

// The volume of the cone equation. //
Vc = ( 1.0 / 3.0 ) * pi * pow(radius,2) * height;

cout << "The volume of the cone is: " << Vc << " inches^3. \n\n";

break;

case 2:
cout << " Please enter the radius of the sphere in inches. \n.";
cin >> radius;

// The volume of the sphere equation. //
Vs = ( 4.0 / 3.0 ) * pi * pow(radius,3);

cout << "The volume of the sphere is:" << Vs << "inches^3. \n\n";

break;

case 3:
cout << " Please enter the the value of the one of the legs in inches \n";
cin >> x;

cout << " please enter the value of the other leg in inches. \n";
cin >> y;

//The equation to find the hypotenuse.//
hyp = sqrt(pow(x,2) * pow(y,2));

cout << "The value of the hypotenuse is:" << hyp << "inches^2 \n\n";

break;

case 4:
cout << " please enter the base of the pyramid in inches \n";
cin >> base;

cout << " please enter the value of the of the height in inches \n.";
cin >> height;

// The equation of the volume of the pyramid. //
Vp = ( 1.0 / 3.0 ) * base * height;

cout << "The volume of the pyramid is" << Vp << "inches^3 \n.";

break;


case 5:
cout << " please enter the radius of the circle in inches \n.";
cin >> radius;

//The equation of area of a circle.//
Ac = pi * pow(radius,2);

cout << " The area of the circle is:" << Ac << " inches^2 \n";

break;

system ( "pause");

}

return(0);

}




Im getting errors that say: error C2065: 'default' : undeclared identifier
:error C2143: syntax error : missing ';' before 'string'
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I need help ;/ thanks
Mar 4, 2015 at 3:00am
did you press build solusion yet? cause your program work on my computer.
Mar 4, 2015 at 9:28am
Yep works fine for me aswell.
Mar 4, 2015 at 1:09pm
Working for me as well. Which compiler are you using?
Topic archived. No new replies allowed.