fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5. int score[5];
  6. int sum;
  7. int avg;
  8.  
  9. score[0] = 75;
  10. score[1] = 80;
  11. score[2] = 65;
  12. score[3] = 60;
  13. score[4] = 70;
  14.  
  15. sum = score[0] + score[1] + score[2] + score[3] + score[4];
  16. avg = sum / 5;
  17. printf("平均点は%d点です。", avg);
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 4376KB
stdin
Standard input is empty
stdout
平均点は70点です。