diff --git a/src/main/java/edu/unl/cse/soft160/conditionals/Scramble.java b/src/main/java/edu/unl/cse/soft160/conditionals/Scramble.java index edc29bc16732ce9328a7caff369be30ecf521399..a13a442c61933c525e899a7a20b846a24e714746 100644 --- a/src/main/java/edu/unl/cse/soft160/conditionals/Scramble.java +++ b/src/main/java/edu/unl/cse/soft160/conditionals/Scramble.java @@ -3,34 +3,34 @@ package edu.unl.cse.soft160.conditionals; import java.util.Scanner; public class Scramble { - public static void main(String... arguments) { - // REARRANGE THE CODE TO SOLVE THE PROBLEM - // DO NOT ADD, REOVE, OR MODIFY ANY OF THE LINES - // BE SURE TO RUN THE SOURCE FORMATTER WHEN YOU'RE DONE - System.out.println("The median is " + thirdValue + "."); - System.out.println("The median is " + thirdValue + "."); - System.out.println("The median is " + secondValue + "."); - System.out.println("The median is " + secondValue + "."); - System.out.println("The median is " + firstValue + "."); - System.out.println("The median is " + firstValue + "."); - System.out.print("Enter third value: "); - System.out.print("Enter second value: "); - System.out.print("Enter first value: "); - scanner.close(); - Scanner scanner = new java.util.Scanner(System.in); - int thirdValue = Integer.parseInt(scanner.nextLine()); - int secondValue = Integer.parseInt(scanner.nextLine()); - int firstValue = Integer.parseInt(scanner.nextLine()); - if (secondValue > thirdValue) { - if (secondValue < thirdValue) { - if (firstValue > secondValue) { - } else if (firstValue > thirdValue) { - } else if (firstValue < thirdValue) { - } else { - } else { - } else { - } - } - } - } + public static void main(String... arguments) { + // REARRANGE THE CODE TO SOLVE THE PROBLEM + // DO NOT ADD, REOVE, OR MODIFY ANY OF THE LINES + // BE SURE TO RUN THE SOURCE FORMATTER WHEN YOU'RE DONE + System.out.println("The median is " + thirdValue + "."); + System.out.println("The median is " + thirdValue + "."); + System.out.println("The median is " + secondValue + "."); + System.out.println("The median is " + secondValue + "."); + System.out.println("The median is " + firstValue + "."); + System.out.println("The median is " + firstValue + "."); + System.out.print("Enter third value: "); + System.out.print("Enter second value: "); + System.out.print("Enter first value: "); + scanner.close(); + Scanner scanner = new java.util.Scanner(System.in); + int thirdValue = Integer.parseInt(scanner.nextLine()); + int secondValue = Integer.parseInt(scanner.nextLine()); + int firstValue = Integer.parseInt(scanner.nextLine()); + if (secondValue > thirdValue) { + if (secondValue < thirdValue) { + if (firstValue > secondValue) { + } else if (firstValue > thirdValue) { + } else if (firstValue < thirdValue) { + } else { + } else{ + } else{ + } + } + } + } }