Thread: C++ Program that Calculates average of three scores

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    1

    Unhappy C++ Program that Calculates average of three scores

    //function prototypes
    void getTestscores(int&);
    void calcAverage (int&,int&);
    void displayScores (int&);

    int main()
    {

    string name ="";
    int Testscores =0;
    int calcAverage =0;

    //get input items
    get Testscores(Testscores);

    //calculate average score
    calcAverage (calculate Average of scores);

    //display output item
    displayScores (Scores);

    return 0;
    } //end of main function

    //*****program-defined functions*****
    void getInput (string &cust, int &cur, int &prev)

    {
    cout >>"Testscore:";
    getline(cin, score);
    cout << "calcAverage: ";
    cin >>average;
    cout << "displayAverage: ";
    cin >>average;

    } //end of getInput function

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    24

    Question Nice

    nice code i guess, is there something wrong with it? You may want to add header files. Hope this helps.

    Skeptic

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c program help
    By Sleepwalker817 in forum C Programming
    Replies: 4
    Last Post: 03-29-2008, 05:31 AM
  2. please i need help
    By aarf5 in forum C++ Programming
    Replies: 3
    Last Post: 10-15-2007, 01:22 AM
  3. Help with begginer C++ program.
    By EZ15 in forum C++ Programming
    Replies: 2
    Last Post: 12-03-2002, 01:00 AM
  4. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  5. My program, anyhelp
    By @licomb in forum C Programming
    Replies: 14
    Last Post: 08-14-2001, 10:04 PM