Start set num = 0 display " enter the number" read num if ( remainder (num / 2…
2018
Start set num = 0 display " enter the number" read num if ( remainder (num / 2 ) = 0 ) display "yes" else display "no" end
If the output of the above algorithm is "yes", it indicates that num is
- A.
Even number
- B.
Amstrong number
- C.
Odd number
- D.
Prime number
Attempted by 199 students.
Show answer & explanation
Correct answer: A
The algorithm checks the condition remainder(num / 2) = 0. When a number is divided by 2 and leaves a remainder of 0, it means the number is perfectly divisible by 2. This is the defining characteristic of an even number. Thus, option A is correct.