Hello..!!
For the past 2 weeks due to medical problems, i was unable to attend my courses at University. Yesterday,while checking my university mail, I saw that assignment. I've got this computer programming work to be submitted online today at latest midnight, i.e, 7 hours left, to complete this work.
Given I was absent in class, I completely lost for the two last question. When I saw them, I was like "WTF! Did we do that in class!!". I'm still a first year student. So, i'm still a beginner in program design. I'm used to using the <stdio.h> library. I'm usin Dev C++.
If possible please explain the logic behind the codes used.
Please Help..!!
I'd be really grateful.
Here they are:
According to University regulations, the following mapping between a student’s final mark and the indicative classification of degree is provided for guidance of the board of examiners.
>= 70 First Class Honours
60-69 Upper Second Class Honours
50-59 Lower Second Class Honours
40-49 Third Class Honours
<40 Not an honours degree
(There are other regulations that affect the degree classification.)
Write a program to prompt the user to enter a mark as a floating point number. Check that the mark is in the range 0.0 – 100.0 and, if it is, display the indicative degree classification according to the mapping above and if not, then display a message saying that the marks input is invalid.
Test your program to ensure that the mapping is correct.
Next one:
The UK sequence of traffic lights is:
"Red" (means stop); this is followed by:
"Red and Amber" (means prepare to go); this is followed by:
"Green" (means go); this is followed by:
"Amber" (means prepare to stop); this is followed by:
"Red"; etc..
Write a program that prompts the user to enter the current state of a traffic light, then displays the next state.
For example, if the current state is "Red and Amber", the next state is "Green".
Use a menu system to obtain the current.
Thank You..!!