Thread: Hand Up

  1. #1
    Registered User
    Join Date
    Dec 2001
    Posts
    1

    Red face Hand Up

    Hey fellow Programmers,

    I'm only a beginner, and hope the Pro's on this site remember their early days of programming!!!
    I'm trying to find a solution to a simple program, but cant get it to work.

    Here is the problem:
    A student sits an exam, which consits of 2 components; coursework and written examination.
    In order to pass the exam he has to have 40 points, if he gets 39 points his result will be rounded up to 40 points.
    He also has to reach 15 points in each subject to pass the exam, if he doesnt he will get a technical fail of 39 points.

    Where will i start, and how????
    Please help if you can, i will be forever grateful!!!!


    Thanx for your time
    Rolf

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    Perhaps some pseudocode would be of help. All you need to do now is modify it to suit your needs and turn it into C++ code
    Code:
    Start program
        enter the scores
        if the coursework is > 15
            if the written test is > 15
                fail = false
                if score is 39
                    score = 40
                print score
        else
            fail = true
            print score
    End program
    My best code is written with the delete key.

Popular pages Recent additions subscribe to a feed