#include <stdio.h> int main() { float sum = 0.0; float arr[5] = { 0.0 }; for (int i = 0; i < 5; i++) { scanf("%f", &arr[i]); sum += arr[i]; } //输出 printf("%.2f\n", sum / 5.0); return 0; }
#include <stdio.h> int main() { float sum = 0.0; float arr[5] = { 0.0 }; for (int i = 0; i < 5; i++) { scanf("%f", &arr[i]); sum += arr[i]; } //输出 printf("%.2f\n", sum / 5.0); return 0; }