Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

import java.util.

Scanner;

public class Lowest_Number {


public static void main(String[] args) {
double a, b, c, lowest;

Scanner input = new Scanner(System.in);

System.out.println("Enter three numbers.");


System.out.print(" Enter the first number: ");
a = input.nextDouble();
System.out.print(" Enter the second number: ");
b = input.nextDouble();
System.out.print(" Enter the third number: ");
c = input.nextDouble();

input.close();

lowest = a;
if (b < lowest){
lowest = b;
}
if (c < lowest){
lowest = c;
}

System.out.println("The lowest number is: " + lowest);


}
}

You might also like