代码块:
package Test;
import java.util.Scanner;
public class Test {
public static void main (String[] args) {
int a, b, c;
double average;
Scanner input = new Scanner (System.in);
System.out.print ("Enter a, b, c: ");
a = input.nextInt();
b = input.nextInt();
c = input.nextInt();
average = ((double)a + (double)b + (double)c) / 3;
System.out.println ("Average = " + average);
}
}