Advertisement
apez1

Term 1: Lesson 13 - Coding Activity 2

Sep 25th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1.     import java.io.*;
  2. import static java.lang.System.*;
  3. import java.util.Scanner;
  4. import java.lang.Math;
  5.  
  6. public class Lesson_13_Activity_Two {
  7.     public static void main (String str[]) throws IOException {
  8.      
  9.      int x;
  10.      
  11.      Scanner scanner = new Scanner(System.in);
  12.      System.out.println("Input a grade");    
  13.      x = scanner.nextInt();
  14.  
  15.     if(x >=60) {
  16.       System.out.println("passing");
  17.      }
  18.      else {
  19.       System.out.println("failing");
  20.  
  21.      }
  22.      
  23.     }
  24.  
  25.    }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement