Answer:
II only.
Step-by-step explanation:
The block that you want executed if the if-expression (x<10) is true, has to be enclosed in { ... }.
I is wrong because it only declares "ans" conditionally. It wouldn't compile even.
II is correct.
III has the opening curly brace at the wrong place. It will not compile.