fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. int test[5];
  6. int i, j;
  7.  
  8. printf("5人の点数を入力してください。\n");
  9. for(i=0; i<5; i++){
  10. scanf("%d", &test[i]);
  11. }
  12.  
  13. for(j=0; j<5; j++){
  14. printf("%d番目の人の点数は%dです。\n", j+1, test[j]);
  15. }
  16.  
  17. return 0;
  18. }
Success #stdin #stdout 0s 5284KB
stdin
1
15
5
55
51
stdout
5人の点数を入力してください。
1番目の人の点数は1です。
2番目の人の点数は15です。
3番目の人の点数は5です。
4番目の人の点数は55です。
5番目の人の点数は51です。