homework05 standard calculator.cpp

# homework05 standard calculator.cpp - #include...

This preview shows pages 1–3. Sign up to view the full content.

#include <iostream> #include <cmath> using namespace std; //Program statistic calculator of 3 real values //DECLARATION OF PROTOTYPES int menu(); void dataInput (float &x1,float &x2, float &x3); void showSum (float x1,float x2, float x3); void showSeries (float x1,float x2, float x3); void showMax (float x1,float x2, float x3); void showMinimum (float x1,float x2, float x3); void showMean (float x1,float x2, float x3); void showFullReport (float x1,float x2, float x3); void showStandDev (float x1,float x2, float x3); int main(void){ int op; float x1=0,x2=0, x3=0; do{ op=menu(); //Menu-driven implemented by switch switch(op){ case 1: system("cls"); dataInput(x1,x2,x3); break; case 2: system("cls"); showMinimum(x1,x2,x3); break; case 3: system("cls"); showMax(x1,x2,x3); break; case 4: system("cls"); showSum(x1,x2,x3); break; case 5: system("cls"); showMean(x1,x2,x3); break; case 6: system("cls"); showStandDev(x1,x2,x3); break; case 7: system("cls"); showFullReport(x1,x2,x3); break; case 8: system("cls"); showSeries(x1,x2,x3); break; } }while(op!=0); return 0; } int menu(void){ int option; //Menu with 8 options cout<<"\n\nBasic Calculator\n"; cout<<" 1. Insert series"<<endl;

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
cout<<" 2. Minimum"<<endl;
This is the end of the preview. Sign up to access the rest of the document.

{[ 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