题解 | #学生基本信息输入输出#

学生基本信息输入输出

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);


}

全部评论

相关推荐

头像
05-16 11:16
已编辑
东华理工大学 Java
牛客737698141号:盲猜几十人小公司,庙小妖风大,咋不叫她去4️⃣呢😁
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务