ADD file via upload

main
ptslgaequ 6 days ago
parent 050a2a3c07
commit 2f67b0c3b0

@ -0,0 +1,20 @@
#include <stdio.h>
int main() {
int studentId[3];
float mathScore[3];
float physicsScore[3];
float englishScore[3];
float totalScore[3];
for (int i = 0; i < 3; i++) {
scanf("%d", &studentId[i]);
scanf("%f", &mathScore[i]);
scanf("%f", &physicsScore[i]);
scanf("%f", &englishScore[i]);
totalScore[i] = mathScore[i] + physicsScore[i] + englishScore[i];
}
for (int i = 0; i < 3; i++) {
printf("%d %0.1f %0.1f %0.1f %0.1f\n", studentId[i], mathScore[i], physicsScore[i], englishScore[i], totalScore[i]);
}
return 0;
}
Loading…
Cancel
Save