Rice11.cpp

# Rice11.cpp - Student name Karina Rice Course COSC 1303...

• 3
• 100% (1) 1 out of 1 people found this document helpful

This preview shows page 1 - 2 out of 3 pages.

/////////////////////////////////////////////////////////////////// // Student name: Karina Rice // Course: COSC 1303 - Computer Science I // Assignment: #11 - math loops // File name: Rice10.cpp // Purpose: Number sort - This program will show a menu and ask user to choose an option, ask the user for a value, // then calculate the volume of a cone, sphere, ocatagon, and distance between two points // then display the values. // // Assumptions: None // // Limitations: None // // Development Computer: 2012 Macbook Pro // Operating System: OS X El Capitan // Compiler: GNU G++ // Integrated Development Environment (IDE): jGRASP // Operational Status: /////////////////////////////////////////////////////////////////// #include <iostream> #include <iomanip> #include <cmath> using namespace std; //Function Prototypes double coneVolume (double coneR, double userH); double sphereVolume (double sphereR); double octagonArea (double sideL); double pointDistance (double a, double b, double c, double d); int main () { int option; double const pi = 3.14159; double coneVolume, sphereVolume, octagonArea, userHeight, coneRadius, sphereRadius, sideLength, pointDistance, x1, x2, y1, y2; do { cout<<"Choose one of the following:"<<endl; cout<<"1) Cone"<<endl; cout<<"2) Shpere"<<endl;

Subscribe to view the full document.

• Spring '14
• Rouse,K
• Cone, endl, cout

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern