Guest User

Untitled

a guest
Feb 25th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class TheLowestThree {
  4. public static void main(String[] args) {
  5. Scanner scan = new Scanner(System.in);
  6. System.out.print("Please enter a: ");
  7. int a = scan.nextInt();
  8. System.out.print("Please enter b: ");
  9. int b = scan.nextInt();
  10. System.out.print("Please enter c: ");
  11. int c = scan.nextInt();
  12.  
  13. if (a<=b && a<=c) {
  14. System.out.println("min = " + a);
  15. } else if (b<=a && b<=c){
  16. System.out.println("min = " + b);
  17. } else if (c<=a && c<=b){
  18. System.out.println("min = " + c);
  19. }
  20.  
  21. }
  22. }
Add Comment
Please, Sign In to add comment