Like Tree5Likes
  • 4 Post By oogabooga
  • 1 Post By rags_to_riches

question

This is a discussion on question within the C++ Programming forums, part of the General Programming Boards category; Assume the following: (1) The number of the students in your class is a random number between [131, 162]. (2) ...

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

    question

    Assume the following:
    (1) The number of the students in your class is a random number between [131, 162].
    (2) Every student has 3 exams, and each exam grade is a random integer between [10, 100].
    (3) A student's total grade is the average of the three exam grades.
    (4) If the total grade is in [10, 59], the letter grade is F; If the total grade is in [60, 74], the letter grade is C;
    If the total grade is in [75, 84], the letter grade is B; If the total grade is in [85, 100], the letter grade is A.

    Requirements:

    (1) you need to use a 2-dimensional array to store all the grades for the students. For eachs student, you need to
    store her student number (a number ranging from 1 to the total number of student), her grades for three exams, and
    her final grade.

    (2) You first need to print the maximum and minimum grades for each exam, and the corresponding student number.

    Output can look like:

    Exam 1 maximum Student number
    100 24

    Exam 2 minimum Student number
    10 165


    (3) You need to sort all the students based upon their final grades in the descending order. Then print the
    sorted list in the following format (I show a sample output below):


    Student Number Final Grade Letter Grade

    24 100 A
    17 98 A
    160 95 A

    (4) Finally, you need to add a student into the list if the class is not full yet (maximum size is always 162). Again, you need to randomly
    generate this student's grades for 3 exams and calculate her total. When you insert, make sure the sorted order
    on the total grade is obeyed.


    Then you need to print out the new list (in the same format above). On your print out, please put a "start sign"
    to indicate which one is the new student.


    At last, please use getchar() at the end of main function so that the output window will stay.

    Please make sure your output looks neat and awesome!

    Anyone know how to help me with this problems. All help appreciated.

  2. #2
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Assume the following:

    No one will help you unless and until you put in some effort yourself.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  3. #3
    a_capitalist_story
    Join Date
    Dec 2007
    Posts
    2,657
    Unlikely, seeing as the same thing was posted elsewhere 4 days ago. I'm guessing effort is not in this person's vocabulary.
    Salem likes this.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    Homework policy violation.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-23-2011, 10:00 AM
  2. *szString = things question/memory question
    By Jang in forum C Programming
    Replies: 3
    Last Post: 01-20-2011, 04:59 AM
  3. Newbish Question file reading question....
    By kas2002 in forum C Programming
    Replies: 23
    Last Post: 05-17-2007, 01:06 PM
  4. Self regiserting DLLs question and libraries question.
    By ApocalypticTime in forum Windows Programming
    Replies: 2
    Last Post: 03-22-2003, 02:02 PM
  5. A question of color...(not a racial question)
    By Sebastiani in forum Windows Programming
    Replies: 7
    Last Post: 01-15-2003, 08:05 PM

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