Here is the method named getNumberOfMaxParam that takes three integer numbers and returns the position of the first maximum in the order of the method parameters.
The method should return number 1, 2 or 3 respectively.
Write just a body of the method.
Declaring methods
Find the max of three numbers
Report a typo
Sample Input 1:
12 3 12Sample Output 1:
1Write a program in Java 17
import java.util.Scanner;
public class Main {
public static int getNumberOfMaxParam(int a, int b, int c) {
// write a body here
}
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
final int a = scanner.nextInt();
final int b = scanner.nextInt();
final int c = scanner.nextInt();
System.out.println(getNumberOfMaxParam(a, b, c));
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.