5-1的编程练习是无法使用Scanner吗
import java.util.Scanner;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("请输入你的成绩:");
Scanner input=new Scanner(System.in);
int score = input.nextInt();
int count = 0;
System.out.println("加分前成绩:"+score);
//打印输出加分前成绩
while (score<60){
score++;
count++;
}
System.out.println("加分后成绩:"+score);
System.out.println("共加了"+count+"次!");
}
}