/***************************************************************************
* Name:
* NetID:
* Precept:
*
* Description: Maxi reads in three integers from standard input. Then it
* finds the maximum value. Then it converts these three integers to quotients
* and finds the maximum of those values. What will the output of this code
* always be?
*
* Remarks: Notice that both functions have the same name. How does Java
* know which max3() you mean when you call max3(1, 2, 3)? What would happen
* if you called max3(1, 2, 3.0)?
*
* Dependencies: StdIn.java, StdOut.java (This is book exercise 2.1.1.)
**************************************************************************/
public class Maxi {
// return the maximum of three integers
public static __________ max3(_________________________________) {
}
// return the maximum of three doubles
public static __________ max3(_________________________________) {
}
public static void main(String[] args) {
// Input three integers from standard input
int num1 = StdIn.readInt();
int num2 = StdIn.readInt();
int num3 = StdIn.readInt();
// Call the function max3(a, b, c) to find the largest
int largest = max3(num1, num2, num3);
// make three quotients with largest as the denominator
double q1 = (double) num1 / largest;
double q2 = (double) num2 / largest;
double q3 = (double) num3 / largest;
// print the largest quotient
// What will this program always print?
System.out.println(max3(q1, q2, q3));
}
}