Java 提示输入成绩,求平均分
public class 练习1 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print(“请输入Java成绩:”);
int java = input.nextInt();
System.out.print(“请输入MySQL成绩:”);
int mysql = input.nextInt();
System.out.print(“请输入HTML成绩:”);
int html = input.nextInt();
int sum = java + mysql + html;
double avg = sum / 3.0;
System.out.println("平均分:" + avg);
}
}