homework08.cpp

homework08.cpp - /Basic Statistic Calculator based on...

• Homework Help
• 4

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

//Basic Statistic Calculator based on menu #include <iostream> #include <fstream> #include<cmath> using namespace std; //Declaration of prototypes int menu(); void dataInput(float a[], int &size); void showSeries(float a[], int size); void showMinimum(float a[], int size); void showSum(float a[], int size); float sum(float a[], int size); void showMean(float a[], int size); void showFullReport(float a[], int size); void showStandDev(float a[],int size); void showMaximum(float a[], int size); void saveToFile(float a[], int size); float readFromFile(float a[], int size); //Constants const int MAXSIZE=100; int main(void){ int op; float a[MAXSIZE]; int size=0; do{ op=menu(); switch(op){ case 1: system("cls"); dataInput(a, size); break; case 2: system("cls"); showMinimum(a,size); break; case 3: system("cls"); showMaximum(a,size); break; case 4: system("cls"); showSum(a,size); break; case 5: system("cls"); showMean(a, size); break; case 6: system("cls"); showStandDev(a, size); break; case 7: system("cls"); showFullReport(a,size); break; case 8: system("cls"); showSeries(a, size); break;

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

case 9: system("cls"); saveToFile(a, size); break; case 10:
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