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

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

View Full Document Right Arrow Icon
//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;
Image of page 1

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

View Full Document Right Arrow Icon
case 9: system("cls"); saveToFile(a, size); break; case 10:
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern