From abc50c9e07056c12559a2470c6402654c2096c2c Mon Sep 17 00:00:00 2001 From: Christopher Bohn <bohn@unl.edu> Date: Wed, 25 Sep 2024 08:03:08 -0500 Subject: [PATCH] Reformatted for 2024 formatting convention --- .../cse/soft160/conditionals/Scramble.java | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) 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 edc29bc..a13a442 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{ + } + } + } + } } -- GitLab