Academic

This is a discussion on Academic within the C Programming forums, part of the General Programming Boards category; This is the program that calculates avg. GPA and couple of other things. I am stuck right now and looking ...

  1. #1
    Registered User
    Join Date
    Oct 2007
    Posts
    21

    Academic

    This is the program that calculates avg. GPA and couple of other things. I am stuck right now and looking which way to go....looking forward for some brains.....


    Sample Run
    ***********************************************
    * Welcome to the Academic Standing System *
    * Developed by your-name *
    ***********************************************
    more students (Y or N)? Y
    Enter student id, class, cum. hours, cum. GPA: 1001 2005 10 3.30
    Hours and grade (0 0 to end)? 3 3
    Hours and grade (0 0 to end)? 4 4
    Hours and grade (0 0 to end)? 0 0

    Student ID: 1001
    Class: 2005
    New Cumulative Hours: 17
    New Cumulative GPA: 3.41

    more students (Y or N)? Y
    Enter student id, class, cum. hours, cum. GPA: 1501 2006 23 2.90
    Hours and grade (0 0 to end)? 3 2
    Hours and grade (0 0 to end)? 3 2
    Hours and grade (0 0 to end)? 4 3
    Hours and grade (0 0 to end)? 0 0
    Student ID: 1501
    Class: 2006
    New Cumulative Hours: 33
    New Cumulative GPA: 2.75

    more students (Y or N)? Y
    Enter student id, class, cum. hours, cum. GPA: 1231 2004 66 3.45
    Hours and grade (0 0 to end)? 4 3
    Hours and grade (0 0 to end)? 0 0

    Student ID: 1231
    Class: 2004
    New Cumulative Hours: 70
    New Cumulative GPA: 3.42

    more students (Y or N)? N

    Number of students = 3
    Number in good standing = 1

    Thank you for using the Academic Standing System. Bye bye!


    This is what i have so far:
    ____________________
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    what is the problem?

  3. #3
    Registered User
    Join Date
    Oct 2007
    Posts
    21

    Academic

    Where do i go from here?

  4. #4
    Registered User
    Join Date
    Oct 2007
    Posts
    21
    Check out the attachment since the program is incomplete....

  5. #5
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    do the easy stuff first.

    welcome function, etc.
    Code:
    void reportSummary(int numStudents, int numInGoodStanding);
    you'll need another loop inside your loop to do this:
    Hours and grade (0 0 to end)? 3 2
    Hours and grade (0 0 to end)? 3 2
    Hours and grade (0 0 to end)? 4 3
    Hours and grade (0 0 to end)? 0 0
    Code:
    int Comp_Grade(char grade) {
    
      if (grade == 'A')
        return 4;
      else if (grade == 'B')
        return 3;
      else if (grade == 'C')
        return 2;
      else if (grade == 'D')
        return 1;
      else if (grade == 'F')
        return 0;
      else
        return -1;
        system("pause"); //never reaches here.
        return 1; //
    }

  6. #6
    Registered User
    Join Date
    Oct 2007
    Posts
    21
    robwhite , you re no help so dont bother

  7. #7
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    ok. no problem.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Microsoft Visual Studio Professional vs Academic
    By Bajanine in forum Tech Board
    Replies: 3
    Last Post: 03-06-2009, 10:11 AM
  2. Your participation requested for an academic survey
    By osq_project in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 10-11-2004, 10:55 PM
  3. MS Academic License for VS.NET Pro
    By lightatdawn in forum Tech Board
    Replies: 4
    Last Post: 03-27-2004, 08:48 AM
  4. visual studio 2003 academic...
    By revelation437 in forum Tech Board
    Replies: 4
    Last Post: 01-01-2004, 08:29 PM
  5. Visual Studio .net Academic...
    By heljy in forum C++ Programming
    Replies: 4
    Last Post: 04-05-2002, 12:58 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21