#include <stdio.h>
int main()
{
int id, age, math, english, c_lang, eng_graph, physics, info;
char name[20];
scanf("%d%s%d", &id, name, &age);
scanf("%d%d%d%d%d%d", &math, &english, &c_lang, &eng_graph, &physics, &info);
int total_score = 0;
if (math > 60)
total_score += 4;
if (english > 60)
total_score += 3;
if (c_lang > 60)
total_score += 4;
if (eng_graph > 60)
total_score += 3;
if (physics > 60)
total_score += 3;
if (info > 60)
total_score += 3;
printf("%d %s %d\n", id, name, age);
printf("%d\n", total_score);
return 0;
}
计算课程积分-结构体
于 2023-05-10 16:35:32 首次发布