More than two choices
Watch it run · 1 of 3
Marks of 80
1import java.util.*;23public class Main {4 public static void main(String[] args) {5 Scanner in = new Scanner(System.in);6 int marks = in.nextInt();7 if (marks >= 90) {8 System.out.println("A");9 } else if (marks >= 75) {10 System.out.println("B");11 } else if (marks >= 40) {12 System.out.println("C");13 } else {14 System.out.println("Fail");15 }16 }17}
Memory
int marks
80
Typed input
80
Output
(nothing yet)line 6Read 80.
step 1 of 4