import java.util.Scanner; public class Recitation3 { public static void main(String[] args) { String runner1, runner2, runner3; String first, second, third; boolean oneLessThanTwo, oneLessThanThree, twoLessThanThree; double time1, time2, time3; Scanner keyboard = new Scanner(System.in); System.out.print("Enter the first runner's name: "); runner1 = keyboard.nextLine(); System.out.print("Enter the first runner's time: "); time1 = keyboard.nextDouble(); keyboard.nextLine(); System.out.print("Enter the second runner's name: "); runner2 = keyboard.nextLine(); System.out.print("Enter the second runner's time: "); time2 = keyboard.nextDouble(); keyboard.nextLine(); System.out.print("Enter the third runner's name: "); runner3 = keyboard.nextLine(); System.out.print("Enter the third runner's time: "); time3 = keyboard.nextDouble(); oneLessThanTwo = time1 < time2; oneLessThanThree = time1 < time3; twoLessThanThree = time2 < time3; if(oneLessThanTwo && oneLessThanThree && twoLessThanThree) { first = runner1; second = runner2; third = runner3; } else if(oneLessThanTwo && oneLessThanThree && !twoLessThanThree) { first = runner1; second = runner3; third = runner2; } else if(oneLessThanTwo && !oneLessThanThree) { first = runner3; second = runner1; third = runner2; } else if(!oneLessThanTwo && oneLessThanThree) { first = runner2; second = runner1; third = runner3; } else if(!oneLessThanTwo && !oneLessThanThree && twoLessThanThree) { first = runner2; second = runner3; third = runner1; } else { first = runner3; second = runner2; third = runner1; } System.out.println("First Place: " + first); System.out.println("Second Place: " + second); System.out.println("Third Place: " + third); } }