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"); } } }

23rd Jun 2021, 8:14 PM
Usman Muhammad Bukar
Usman Muhammad Bukar - avatar
2 Respostas
+ 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..
23rd Jun 2021, 8:20 PM
Jayakrishna 🇮🇳
+ 1
Tnx
23rd Jun 2021, 8:23 PM
Usman Muhammad Bukar
Usman Muhammad Bukar - avatar