fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4.  
  5. int i;
  6. int a[10];
  7. a[0] = 3;
  8.  
  9. printf("1項目:%d\n",a[0]);
  10.  
  11. for(i = 1;i < 10;i ++){
  12. a[i] = a[i-1] + 3;
  13. printf("%d項目:%d\n",i+1,a[i]);
  14. }
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
1項目:3
2項目:6
3項目:9
4項目:12
5項目:15
6項目:18
7項目:21
8項目:24
9項目:27
10項目:30