题解 | #学生基本信息输入输出#
学生基本信息输入输出
http://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String stuInfo = in.nextLine();
String[] stuInfos = stuInfo.split(";");
String[] stuScores = stuInfos[1].split(",");
System.out.printf("The each subject score of No. %d is %.2f, %.2f, %.2f.", Integer.parseInt(stuInfos[0]), Float.parseFloat(stuScores[0]) , Float.parseFloat(stuScores[1]), Double.parseDouble(stuScores[2]));
}
}