0
HELP PLS If score is greater than 3.5 print congratulation if its less than print sorry
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); double score=scanner.nextDouble(); // your code goes here if(score>3.5); {System.out.println("Congratulation"); } else{ System.out.println("Sorry"); } } }
2 Respuestas
+ 2
Remove semicolon after if statement.
if(score>3.5){
..
}
edit:
Usman Muhammad Bukar
if this code about practices, to pass test cases, do check spelling and capitalizations if any need as per description..
+ 1
Tnx