题解 | #成绩输入输出#
成绩输入输出
http://www.nowcoder.com/practice/eb49750ef0de47168c21761de086d97c
import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner in = new Scanner(System.in); String chengji = in.nextLine(); String[] scores = chengji.split(" "); int i = scores.length; for(int j=0;j<i;j++){ if(j<i-1) System.out.print("score"+(j+1)+"="+scores[j]+","); else System.out.print("score"+(j+1)+"="+scores[j]); }
}
}