C-17-Q048mediumsingle_mcq
In the positive / negative / zero program, the order of the checks is:
In the positive / negative / zero program, the order of the checks is:
- a
< 0then> 0else zero - b
> 0then< 0else zero - c
== 0then< 0else positive - d
> 0then== 0else negative
ব্যাখ্যা
The program first tests > 0 (positive), then < 0 (negative) with elif, and finally treats the remaining case as zero in the else. This order ensures each sign is reported correctly.