Answer:
public class Main {
public static void printAvg(float a, float b) {
float avg = (a + b) / 2;
System.out.println("The average between " + a + " and " + b + " is: " + avg);
}
public static void main(String[] args) {
printAvg(10.5f, 20.6f); //these numbers are just examples.
}
}
Step-by-step explanation:
you can use double instead of float, that way you don't have to put the 'f' next to the values