Skip to content
Snippets Groups Projects
Verified Commit 16a8a5c8 authored by Christopher Bohn's avatar Christopher Bohn :thinking:
Browse files

Placed Parson's Problem in the starter code

parent 216e34db
Branches
No related tags found
No related merge requests found
...@@ -4,6 +4,33 @@ import java.util.Scanner; ...@@ -4,6 +4,33 @@ import java.util.Scanner;
public class Scramble { public class Scramble {
public static void main(String... arguments) { public static void main(String... arguments) {
// [write code here] // 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 {
}
}
}
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment