CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2011
    Posts
    1

    Have a Question!!

    I'm currently college student in University of Texas. Im trying to write a program to check my grades.
    I need to write a program to compute the grade earned by a (one) student.
    The program will initially request 5 assignment scores, 2 test scores, and 1 final examination score. All scores are out of 100. If any input score is out of range (negative or above 100), output an error statement and terminate the program. Also I need to use bool (in C++) to record whether a score is out-of-range or not.
    Calculate the score of the student based on the following weights:
    85<= score <= 100 A
    74 <= score < 85 B
    63 <= score < 74 C
    52 <= score < 63 D
    0 <= score < 52 F

    P.s
    I do not want to use "if" or "else" for this program.
    please help me on this. I have no idea how to start with it.

  2. #2
    Join Date
    Jun 2009
    Location
    oklahoma
    Posts
    199

    Re: Have a Question!!

    No idea where to start?
    Surely you can start with
    Code:
    int main()
    {
         return 0;
    }

  3. #3
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    Re: Have a Question!!

    Did you heard about case as alternatives for if ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured