@@ -0,0 +1,871 @@
+import java.lang.Math;%0Aimport java.util.Scanner;%0A%0Apublic class SmallestNumber %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Scanner scan = new Scanner(System.in);%0A        double a = scan.nextDouble();%0A        double b = scan.nextDouble();%0A        double c = scan.nextDouble();%0A%0A        double smallest = findSmallest(a, b, c);%0A%0A        if (isInteger(smallest)) %7B%0A            System.out.println((int) smallest);%0A        %7D else %7B%0A            System.out.println(smallest);%0A        %7D%0A    %7D%0A%0A    public static double findSmallest(double a, double b, double c) %7B%0A        if (a %3C b) %7B%0A            if (a %3C c) %7B%0A                return a;%0A            %7D%0A%0A            return c;%0A        %7D%0A%0A        if (b %3C c) %7B%0A            return b;%0A        %7D%0A%0A        return c;%0A    %7D%0A%0A    public static boolean isInteger(double number) %7B%0A        return Math.floor(number) == number;%0A    %7D%0A%7D

Solve homework2-problem4: Smallest of 3 Numbers