0
What's wrong with my code
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double passscore=3.5; double score = scanner.nextDouble(); // your code goes here if(score>passscore) { System .out.println("congratulation"); } else { System .out.println("sorry"); } } }
3 Respostas
+ 2
Maybe there is an extra space in lines "System .out.println("...")" between "System" and "."?
0
It's working..
pls add the problem details for which you wrote the code..
edit:
may be you need >= instead of >, I guess..
0
Reva
You have put an extra space after each "System", so remove that, else your code is fine.