import java.util.*; public class ScannerExample { public static void main(String[] args) { Scanner console = new Scanner(System.in); double modified = math(console); System.out.println("Modified = " + modified); } // Here is where you comment on the method, and the parameters public static double math(Scanner console) { System.out.print("Please type in a double: "); double input = console.nextDouble(); // if the number is greater than or equal to 100, round it // if the number is less than 100, subtract 10 from it if (input >= 100) { if (input >= 200) { input = input * 1000; } else { input = Math.round(input); } } else { input = input - 10; } if (input >= 200) { input = input * 1000; } else if (input >= 100) { input = Math.round(input); } else { // input must be < 100 input = input - 10; } if (false) { } else if (some other test) { } // more similar: 1 branch, or 0 branches if (true/false) { // do this line of code, whatever } if (true/false) { // some code } else if (true/false) { // some other code } else if (true/false) { // even more other code } // ends in else, exactly 1 branch if (true/false) { // some code } else { // some other code } return input; } }