Thread: Help me pls...About computing a grade

  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    1

    Help me pls...About computing a grade

    Pls help me doing a program in C..the problem is..

    a program that compute for grades..

    Prelim

    Quz1:
    Quiz2:
    Cs:
    Exam:
    your prelim grade is:

    Midterm

    Quz1:
    Quiz2:
    Cs:
    Exam:
    your midterm grade is:

    Finals

    Quz1:
    Quiz2:
    Cs:
    Exam:
    your final grade is:

    Total grade:

    /* the general formula for computing the grade for ech period
    prelim grade=((q1*.200+(q2*.2)+(cs*.1)+(ex*.5))
    midterm=((q1*.200+(q2*.2)+(cs*.1)+(ex*.5))
    final=((q1*.200+(q2*.2)+(cs*.1)+(ex*.5))

    while the Total grade is:
    ((prelim*.3)+(midterm*.3)+(final*.4))

    but the problem is we cannot input a grade that is lower than 50 and higher than 100..if you input lower than 50 or greater than 100 there it will display "you inpuat an invaliod value and return to the place where you input an invalid valu..like in this example:

    Prelim

    Quz1:/*i input 80*/
    Quiz2:/*i input 46*/
    you input an invalid value
    pls input again

    Quiz2:/*so you will input again*/

    /*and so on the same with other period*/
    Cs:
    Exam:
    your prelim grade is:

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    What have you tried?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Sep 2006
    Posts
    230
    Did you try writing any code? Man I tell you from little experience on this forum: people don't like working with programs from scratch. You should have at least put in some effort into it.

    If you give us some code, maybe we could help you out.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. can someone help me with these errors please code included
    By geekrockergal in forum C Programming
    Replies: 7
    Last Post: 02-10-2009, 02:20 PM
  2. Compiled without error but Result varies!!
    By RahulDhanpat in forum C Programming
    Replies: 10
    Last Post: 02-12-2008, 10:32 AM
  3. C Array
    By fab04 in forum C Programming
    Replies: 14
    Last Post: 04-13-2007, 01:28 AM
  4. Functions and Structs...
    By pandroff in forum C Programming
    Replies: 1
    Last Post: 12-03-2005, 05:12 PM
  5. Creating a student grade book-how?
    By Hopelessly confused in forum C Programming
    Replies: 5
    Last Post: 10-03-2002, 08:43 PM