This is my very first day of programming without having any programming background. I was trying the below code. Please click the below link for the screenshot.
You have a stray semicolon after your if statement. Because of that, the compiler sees your braces as just defining a random block of code (which is valid) but it doesn't understand why you have an else after that.