Question 2:
(1 mark, file to be edited: Q2.c)
The program allows the user to enter a real number from the keyboard. This real number is the score of a subject holding the test.
The program prints to the screen with the following cases:
"Passed with the score: score", if 5.0 <= score <=10.0"Failed with the score: score", if 0.0 <= score < 5
Here is an example of how the program will run:
Enter values for the score: 7.5
7.5
OUTPUT:
Passed with the score: 7.5
Press any key to continue
Question 3:
(1 mark, file to be edited: Q3.c)
The program allows the user to enter five integers from the keyboard (STDIN).
The program prints the values of 'm' and 'n', where 'm' is the number of even numbers and 'n' is the number of odd numbers.
Below is an example:
Zoom
+ 100%
Close