Find the max of three numbers

Report a typo

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.

Sample Input 1:

12 3 12

Sample Output 1:

1
Write 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));
}
}
___

Create a free account to access the full topic