Q5: Put the code in the right order to create a program that returns a double, and accepts as parameters 3 integers, and calculates the average of the inputs. There is also a main program that calls the method twice with different values.
import java.util.*;
public class main{
public static double avg (int one, int two, int three) {
---
int sum = one + two + three;
---
return sum / 3.0;
}
---
public static void main(String[] args){
---
System.out.println(avg(1, 2, 5));
System.out.println(avg(2, 4, 10));
---
}
}