+ 2
int x = 10 if (x > -1); if (x != 0); if (x > 0); System.out.println (âx is a positive number having value â + x);
It produce error outputđą... Sorryyy I'm a beginner and I wanted to learn coding but sad to say that was so hard for međŁ
2 RĂ©ponses
0
Error because if statement is a code block but you are putting semicolon after it. Try putting curly braces after your if statements {} but leave the semicolon after "int x = 10" hope this helps.
+ 1
Please don't write your code in the title, if your code is short you can paste in Description, if it is big code, then save and share its link by following the below guide
https://www.sololearn.com/post/75089/?ref=app