Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class LowestABC {
  4. public static void main(String[] args) {
  5. Scanner scanner = new Scanner(System.in);
  6. System.out.println("Please enter A");
  7. int a = scanner.nextInt();
  8.  
  9. System.out.println("Please Enter B");
  10. int b = scanner.nextInt();
  11.  
  12. System.out.println("Please enter C");
  13. int c = scanner.nextInt();
  14.  
  15. if (a<b && a<c)
  16. {
  17. System.out.println( a + " a is the lowest number");}
  18. if (b<a && b<c)
  19. {
  20. System.out.println(b + " b is the lowest number");}
  21.  
  22. if (c<a && c<b)
  23. {
  24. System.out.println(c + " c is the lowest number");}
  25.  
  26.  
  27.  
  28.  
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement