Professional Documents
Culture Documents
54 T
54 T
54 T
A) Large ← 0
Small ← 1000
REPEAT
INPUT Number
UNTIL Number >= 1 AND Number < 1000 AND Number = Number DIV 1
THEN
Small ← Number
ENDIF
THEN
Large ← Number
NEXT
OUTPUT "Largest number is ", Large " Smallest number is ", Small" Range of numbers is ", Range
ENDIF
b)
Q2. A)
Y Z A OUTPUT
11 4 3 Invalid
6 2 0 Valid
3 9 0 Valid
3 2 1 Invalid
2 6 0 Valid
0 0
1 1 0 Valid
b) The purpose is to divide the two numbers inputted by the user and then divide the bigger no. by
the smaller number. The Numbers will only be valid if the remainder is 0.