Language: C

Last login: Tue Jun 16 00:51:59 on ttys000
[satoshi@akatsuki-Air] ~
% cd Code/c/     
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/
[satoshi@akatsuki-Air] ~/Code/c
% em fizzbuzz.c
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/       fizzbuzz.c
[satoshi@akatsuki-Air] ~/Code/c
% gcc fizzbuzz.c 
fizzbuzz.c:5:15: error: expected expression
  scanf("%d", %n);
              ^
1 error generated.
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/       fizzbuzz.c
[satoshi@akatsuki-Air] ~/Code/c
% em fizzbuzz.c 
[satoshi@akatsuki-Air] ~/Code/c
% gcc fizzbuzz.c
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/        a.out*       fizzbuzz.c   fizzbuzz.c~
[satoshi@akatsuki-Air] ~/Code/c
% ./a.out 
15
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
[satoshi@akatsuki-Air] ~/Code/c
% ./a.out
100
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBuzz
46
47
Fizz
49
Buzz
Fizz
52
53
Fizz
Buzz
56
Fizz
58
59
FizzBuzz
61
62
Fizz
64
Buzz
Fizz
67
68
Fizz
Buzz
71
Fizz
73
74
FizzBuzz
76
77
Fizz
79
Buzz
Fizz
82
83
Fizz
Buzz
86
Fizz
88
89
FizzBuzz
91
92
Fizz
94
Buzz
Fizz
97
98
Fizz
Buzz
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/        a.out*       fizzbuzz.c   fizzbuzz.c~
[satoshi@akatsuki-Air] ~/Code/c
% rm *~
remove fizzbuzz.c~? y
[satoshi@akatsuki-Air] ~/Code/c
% ls
ITP1/       a.out*      fizzbuzz.c
[satoshi@akatsuki-Air] ~/Code/c
% cd ITP1 
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ls
1_A*      1_B.c     3_A*      3_B.c     4_D*      input
1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
1_B*      2_C.c     3_B*      4_C.c     Makefile
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ls -la
total 264
drwxr-xr-x  20 satoshi  staff   680  6 16 01:52 ./
drwxr-xr-x   6 satoshi  staff   204  6 16 22:23 ../
-rw-r--r--@  1 satoshi  staff  6148  6 16 01:52 .DS_Store
-rwxr-xr-x   1 satoshi  staff  8456  6 15 01:24 1_A*
-rw-r--r--   1 satoshi  staff    77  4 22 22:20 1_A.c
-rwxr-xr-x   1 satoshi  staff  8504  6 15 01:24 1_B*
-rw-r--r--   1 satoshi  staff   120  4 22 22:50 1_B.c
-rwxr-xr-x   1 satoshi  staff  8504  6 15 01:26 2_C*
-rw-r--r--   1 satoshi  staff   304  6 15 01:26 2_C.c
-rwxr-xr-x   1 satoshi  staff  8456  6 15 01:39 3_A*
-rw-r--r--   1 satoshi  staff   116  6 15 01:38 3_A.c
-rwxr-xr-x   1 satoshi  staff  8504  6 15 01:46 3_B*
-rw-r--r--   1 satoshi  staff   174  6 15 01:46 3_B.c
-rwxr-xr-x   1 satoshi  staff  8504  6 16 01:33 4_C*
-rw-r--r--   1 satoshi  staff   349  6 16 01:17 4_C.c
-rwxr-xr-x   1 satoshi  staff  8504  6 16 01:42 4_D*
-rw-r--r--   1 satoshi  staff   349  6 16 01:42 4_D.c
-rw-r-----@  1 satoshi  staff   110  6 15 00:59 Makefile
-rw-r--r--   1 satoshi  staff    44  6 16 01:09 input
-rw-r--r--   1 satoshi  staff    70  6 15 01:10 tmp
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% cp tmp 6_C.c
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% em 6_C.c 
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ls
1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
1_B*      2_C.c     3_B*      4_C.c     6_C*      Makefile
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ./6_C 
3
1 1 3 8
3 2 2 7
4 3 8 1
 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0
####################
 0 0 0 8 0 0 0 0
####################
 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0
####################
 0 0 7 0 0 0 0 0
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% em 6_C.c
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ./6_C   
3
1 1 3 8
3 2 2 7
4 3 8 1
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 8 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 7 0 0 0 0 0 0 0
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% em 6_C.c
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ./6_C   
3 
1 1 3 8
3 2 2 7
4 3 8 1
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 8 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 7 0 0 0 0 0 0 0
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% em 6_C.c
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% ./6_C   
3
1 1 3 8
3 2 2 7
4 3 8 1
 0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0
[satoshi@akatsuki-Air] ~/Code/c/ITP1
% em 6_C.c

#include <stdio.h>

int main(void){
  int n, i, j, k, b, f, r, v;
  int count[4][3][10] = {0};

  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%d %d %d %d", &b, &f, &r, &v);
    count[b - 1][f - 1][r - 1] += v;
  }

  for(i = 0; i < 4; i++){
    if(i)
      printf("####################\n");
    for(j = 0; j < 3; j++){
      for(k = 0; k < 10; k++){
        printf(" %d", count[i][j][k]);
      }
      printf("\n");
    }
  }

  return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'Last'
    1 | Last login: Tue Jun 16 00:51:59 on ttys000
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | Last login: Tue Jun 16 00:51:59 on ttys000
      |           ^
main.c:2:9: error: stray '@' in program
    2 | [satoshi@akatsuki-Air] ~
      |         ^
main.c:4:9: error: stray '@' in program
    4 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:7:9: error: stray '@' in program
    7 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:9:9: error: stray '@' in program
    9 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:12:9: error: stray '@' in program
   12 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:16:15: error: expected identifier or '(' before '^' token
   16 |               ^
      |               ^
main.c:18:9: error: stray '@' in program
   18 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:21:9: error: stray '@' in program
   21 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:23:9: error: stray '@' in program
   23 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:25:9: error: stray '@' in program
   25 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:28:9: error: stray '@' in program
   28 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:46:9: error: stray '@' in program
   46 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:149:9: error: stray '@' in program
  149 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:152:9: error: stray '@' in program
  152 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:155:9: error: stray '@' in program
  155 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:158:9: error: stray '@' in program
  158 | [satoshi@akatsuki-Air] ~/Code/c
      |         ^
main.c:160:9: error: stray '@' in program
  160 | [satoshi@akatsuki-Air] ~/Code/c/ITP1
      |         ^
main.c:162:1: error: invalid suffix "_A" on integer constant
  162 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      input
      | ^~~
main.c:162:11: error: invalid suffix "_B.c" on integer constant
  162 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      input
      |           ^~~~~
main.c:162:21: error: invalid suffix "_A" on integer constant
  162 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      input
      |                     ^~~
main.c:162:31: error: invalid suffix "_B.c" on integer constant
  162 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      input
      |                               ^~~~~
main.c:162:41: error: invalid suffix "_D" on integer constant
  162 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      input
      |                                         ^~~
main.c:163:1: error: invalid suffix "_A.c" on integer constant
  163 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
      | ^~~~~
main.c:163:11: error: invalid suffix "_C" on integer constant
  163 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
      |           ^~~
main.c:163:21: error: invalid suffix "_A.c" on integer constant
  163 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
      |                     ^~~~~
main.c:163:31: error: invalid suffix "_C" on integer constant
  163 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
      |                               ^~~
main.c:163:41: error: invalid suffix "_D.c" on integer constant
  163 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     tmp
      |                                         ^~~~~
main.c:164:1: error: invalid suffix "_B" on integer constant
  164 | 1_B*      2_C.c     3_B*      4_C.c     Makefile
      | ^~~
main.c:164:11: error: invalid suffix "_C.c" on integer constant
  164 | 1_B*      2_C.c     3_B*      4_C.c     Makefile
      |           ^~~~~
main.c:164:21: error: invalid suffix "_B" on integer constant
  164 | 1_B*      2_C.c     3_B*      4_C.c     Makefile
      |                     ^~~
main.c:164:31: error: invalid suffix "_C.c" on integer constant
  164 | 1_B*      2_C.c     3_B*      4_C.c     Makefile
      |                               ^~~~~
main.c:165:9: error: stray '@' in program
  165 | [satoshi@akatsuki-Air] ~/Code/c/ITP1
      |         ^
main.c:170:11: error: stray '@' in program
  170 | -rw-r--r--@  1 satoshi  staff  6148  6 16 01:52 .DS_Store
      |           ^
main.c:171:49: error: invalid suffix "_A" on integer constant
  171 | -rwxr-xr-x   1 satoshi  staff  8456  6 15 01:24 1_A*
      |                                                 ^~~
main.c:172:49: error: invalid suffix "_A.c" on integer constant
  172 | -rw-r--r--   1 satoshi  staff    77  4 22 22:20 1_A.c
      |                                                 ^~~~~
main.c:173:49: error: invalid suffix "_B" on integer constant
  173 | -rwxr-xr-x   1 satoshi  staff  8504  6 15 01:24 1_B*
      |                                                 ^~~
main.c:174:49: error: invalid suffix "_B.c" on integer constant
  174 | -rw-r--r--   1 satoshi  staff   120  4 22 22:50 1_B.c
      |                                                 ^~~~~
main.c:175:49: error: invalid suffix "_C" on integer constant
  175 | -rwxr-xr-x   1 satoshi  staff  8504  6 15 01:26 2_C*
      |                                                 ^~~
main.c:176:49: error: invalid suffix "_C.c" on integer constant
  176 | -rw-r--r--   1 satoshi  staff   304  6 15 01:26 2_C.c
      |                                                 ^~~~~
main.c:177:49: error: invalid suffix "_A" on integer constant
  177 | -rwxr-xr-x   1 satoshi  staff  8456  6 15 01:39 3_A*
      |                                                 ^~~
main.c:178:49: error: invalid suffix "_A.c" on integer constant
  178 | -rw-r--r--   1 satoshi  staff   116  6 15 01:38 3_A.c
      |                                                 ^~~~~
main.c:179:49: error: invalid suffix "_B" on integer constant
  179 | -rwxr-xr-x   1 satoshi  staff  8504  6 15 01:46 3_B*
      |                                                 ^~~
main.c:180:49: error: invalid suffix "_B.c" on integer constant
  180 | -rw-r--r--   1 satoshi  staff   174  6 15 01:46 3_B.c
      |                                                 ^~~~~
main.c:181:49: error: invalid suffix "_C" on integer constant
  181 | -rwxr-xr-x   1 satoshi  staff  8504  6 16 01:33 4_C*
      |                                                 ^~~
main.c:182:49: error: invalid suffix "_C.c" on integer constant
  182 | -rw-r--r--   1 satoshi  staff   349  6 16 01:17 4_C.c
      |                                                 ^~~~~
main.c:183:49: error: invalid suffix "_D" on integer constant
  183 | -rwxr-xr-x   1 satoshi  staff  8504  6 16 01:42 4_D*
      |                                                 ^~~
main.c:184:49: error: invalid suffix "_D.c" on integer constant
  184 | -rw-r--r--   1 satoshi  staff   349  6 16 01:42 4_D.c
      |                                                 ^~~~~
main.c:185:11: error: stray '@' in program
  185 | -rw-r-----@  1 satoshi  staff   110  6 15 00:59 Makefile
      |           ^
main.c:186:46: error: invalid digit "9" in octal constant
  186 | -rw-r--r--   1 satoshi  staff    44  6 16 01:09 input
      |                                              ^~
main.c:188:9: error: stray '@' in program
  188 | [satoshi@akatsuki-Air] ~/Code/c/ITP1
      |         ^
main.c:189:10: error: invalid suffix "_C.c" on integer constant
  189 | % cp tmp 6_C.c
      |          ^~~~~
main.c:190:9: error: stray '@' in program
  190 | [satoshi@akatsuki-Air] ~/Code/c/ITP1
      |         ^
main.c:191:6: error: invalid suffix "_C.c" on integer constant
  191 | % em 6_C.c
      |      ^~~~~
main.c:192:9: error: stray '@' in program
  192 | [satoshi@akatsuki-Air] ~/Code/c/ITP1
      |         ^
main.c:194:1: error: invalid suffix "_A" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      | ^~~
main.c:194:11: error: invalid suffix "_B.c" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      |           ^~~~~
main.c:194:21: error: invalid suffix "_A" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      |                     ^~~
main.c:194:31: error: invalid suffix "_B.c" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      |                               ^~~~~
main.c:194:41: error: invalid suffix "_D" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      |                                         ^~~
main.c:194:51: error: invalid suffix "_C.c" on integer constant
  194 | 1_A*      1_B.c     3_A*      3_B.c     4_D*      6_C.c     input
      |                                                   ^~~~~
main.c:195:1: error: invalid suffix "_A.c" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      | ^~~~~
main.c:195:11: error: invalid suffix "_C" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      |           ^~~
main.c:195:21: error: invalid suffix "_A.c" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      |                     ^~~~~
main.c:195:31: error: invalid suffix "_C" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      |                               ^~~
main.c:195:41: error: invalid suffix "_D.c" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      |                                         ^~~~~
main.c:195:51: error: invalid suffix "_C.c" on integer constant
  195 | 1_A.c     2_C*      3_A.c     4_C*      4_D.c     6_C.c~    tmp
      |                                                   ^~~~~
main.c:196:1: error: invalid suffix "_B" on integer constant
  196 | 1_B*      2_C.c     3_B*      4_C.c     6_C*      Makefile
      | ^~~
main.c:196:11: error: invalid suffix "_C.c" on integer constant
  196 | 1_B*      2_C.c     3_B*      4_C.c     6_C*      Makefile
      |           ^~~~~
main.c:196:21: error: invalid suffix "_B" on integer co