参考代码:
public static void main(String[] args) { Scanner sc = new Scanner(System.in); int sum=0; int y=0; for (int i = 1; i <=10; i++) { int a=sc.nextInt(); if(a<60) { y++; } sum+=a; } System.out.print(String.format("%.1f", (double)sum/10)); System.out.print(" "+y); }
0.0分
0 人评分