题解 | #学生基本信息输入输出#
学生基本信息输入输出
https://www.nowcoder.com/practice/58b6a69b4bf943b49d2cd3c15770b9fd
#include <iostream> #include <random> using namespace std; class student { public: long int number; float score1; float score2; float score3; }; int main() { student s; float d; scanf("%ld;%f,%f,%f",&s.number,&s.score1,&s.score2,&s.score3); printf("The each subject score of No. %ld is %.2f, %.2f, %.2f.",s.number,s.score1,s.score2,s.score3); }