StefanTobler

Lesson 13 Activity 2

Sep 25th, 2016
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.62 KB | None | 0 0
  1. /*
  2.  * Lesson 13 Coding Activity 2
  3.  * Take input of an integer number from the keyboard and print "passing"
  4.  * if it's greater than or equal to 60, and print "failing" otherwise.
  5.  */
  6.  
  7.  
  8. import java.util.Scanner;
  9.  
  10. class Lesson_13_Activity_Two {
  11.     public static void main(String[] args)
  12.      {
  13.        Scanner scan = new Scanner(System.in);
  14.        
  15.        System.out.println("Please enter a interger:");
  16.        
  17.        int x = scan.nextInt();
  18.        
  19.        if(x >=60)
  20.        {  
  21.          System.out.println("passing");
  22.        }
  23.        else
  24.        {
  25.          System.out.println("failing");
  26.        }
  27.     }
  28. }
Add Comment
Please, Sign In to add comment