import java.util.Scanner;
public class WorkTest8 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.println("请输入java的成绩:");
int a = scanner.nextInt();
System.out.println("请输入SQL的成绩:");
int b = scanner.nextInt();
System.out.println("请输入web的成绩:");
int c = scanner.nextInt();
System.out.println("----------------");
System.out.println("Java SQL web");
System.out.println(a+" "+b+" "+c);
System.out.println("----------------");
int num = a-b;
System.out.println("Java和sql的成绩差:"+num);
int num1 = (a+b+c)/3;
System.out.println("三门课程的平均分是:"+num1);
}
}
|
|