Problem with compiler/Editor

There is something wrong, either with the compiler or the editor.
If statements were not working properly without providing ‘curly braces’.
Request you guys to have a look.

Click here to start solving coding interview questions