Professional Documents
Culture Documents
Programming V
Programming V
Science O.L.
(New Syllabus)
01
Programming pt.5
(Conditional)
Programming pt.5
● Nested IFs
● Possibilities
● CASE..DO..OTHERWISE..ENDCASE
Quick question
Write a pseudocode, which takes the students mark and exam full mark as input and output
their performance according to the following table.
-Validate any entry from the user
Hint: calculate the percentage
Quick question
Write a program which accepts three real numbers, if the first number is bigger than the second number and the third
number print "The first is biggest" otherwise is the "The smallest".
Code:
Quick question
Design a program that takes from the user three numbers and show to the user the biggest number
Code:
Bonus Question +5
Design a program that takes from the user three numbers and show to the user in descending order.
Example:
- 1 , 67 ,5 67 , 5 , 1
-3,3,33 , 3, 3
Code:
CASE conditional
New conditional tool.
Used only under two constraints.
Condition asks only using = sign (no ranges) and condition contains only one variable.
CASE [ VARIABLE ] OF
[ Case 1 ] : [ Code ]
[ Case 2 ] : [ Code ]
[ Case 3 ] : [ Code ]
[ Case 4 ] : [ Code ]
Otherwise
[ Final Case ]
ENDCASE
Quick question Design a program that reads from the user the class year and outputs the class name according to the following :
Class Year Class Name
9 Pre-IG
10 Freshman
11 Junior
12 Senior
Code: Display Invalid class year if the class year does not exist in the table
Quick question
Write a pseudocode, which takes the a device number as input and output their device name and its price according
to the following table