计算平均值.c 187 B

12345678910111213
  1. #include <stdio.h>
  2. int main() {
  3. int x, y, z;
  4. scanf("%d %d %d", &x, &y, &z);
  5. int sum = x + y + z;
  6. float average = (float)sum / 3;
  7. printf("%d\n%.2f", sum, average);
  8. return 0;
  9. }