Language: C

Last login: Sat Apr 20 21:17:14 on ttys002
endousatoshinoMacBook-Pro:Desktop endosatoshi$ cd Desktop
-bash: cd: Desktop: No such file or directory
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
  scanf("%d %d %d",&A &B &T);
                   ~~ ^~
at125a.c:13:20: error: use of undeclared identifier 'i'
  printf("%d\n",B*(i-1));
                   ^
2 errors generated.
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
  scanf("%d %d %d",&a &b &t);
                   ~~ ^~
1 error generated.
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
  scanf("%d %d %d",&a &b &t);
                   ~~ ^~
1 error generated.
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
at125a.c:12:23: error: invalid operands to binary expression ('int *' and 'int')
  scanf("%d %d %d",&a &b &t);
                   ~~ ^~
1 error generated.
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
3 5 7
10
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
3 2 9
4
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
3 2 9
6
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
20 20 19
0
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125a.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125b.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125b.c
at125b.c:18:17: error: expected expression
  for(int i=0;i<;i++){
                ^
1 error generated.
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125b.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ gcc at125b.c
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
3
10  5

^C
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
3
10 2 5
6 3 4
5
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
4
13 21 6 19
11 30 6 15
6
endousatoshinoMacBook-Pro:Desktop endosatoshi$ ./a.out
1
1
50
0
endousatoshinoMacBook-Pro:Desktop endosatoshi$ emacs at125b.c

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
int main(void)
{
  int N;
  scanf("%d",&N);
  int v[N];
  int c[N];
  int cost=0;
  for(int i=0;i<N;i++){
    scanf("%d",&v[i]);
  }
  for(int i=0;i<N;i++){
    scanf("%d",&c[i]);
  }
  for(int i=0;i<N;i++){
    if(v[i]-c[i]>0){
      cost+=v[i]-c[i];
    }
  }
  printf("%d\n",cost);

}


Compiler output:
main.c:1:1: error: unknown type name 'Last'
    1 | Last login: Sat Apr 20 21:17:14 on ttys002
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | Last login: Sat Apr 20 21:17:14 on ttys002
      |           ^
main.c:6:62: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    6 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                              ^~~~~~~
main.c:6:74: warning: multi-character character constant [-Wmultichar]
    6 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                                          ^~~~~
main.c:8:20: error: expected identifier or '(' before '~' token
    8 |                    ~~ ^~
      |                    ^
main.c:11:20: error: expected identifier or '(' before '^' token
   11 |                    ^
      |                    ^
main.c:15:62: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   15 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                              ^~~~~~~
main.c:15:74: warning: multi-character character constant [-Wmultichar]
   15 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                                          ^~~~~
main.c:17:20: error: expected identifier or '(' before '~' token
   17 |                    ~~ ^~
      |                    ^
main.c:20:62: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   20 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                              ^~~~~~~
main.c:20:74: warning: multi-character character constant [-Wmultichar]
   20 | at125a.c:9:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                                          ^~~~~
main.c:22:20: error: expected identifier or '(' before '~' token
   22 |                    ~~ ^~
      |                    ^
main.c:26:63: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   26 | at125a.c:12:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                               ^~~~~~~
main.c:26:75: warning: multi-character character constant [-Wmultichar]
   26 | at125a.c:12:23: error: invalid operands to binary expression ('int *' and 'int')
      |                                                                           ^~~~~
main.c:28:20: error: expected identifier or '(' before '~' token
   28 |                    ~~ ^~
      |                    ^
main.c:50:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
   50 |   for(int i=0;i<;i++){
      |                ^
main.c:50:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
   50 |   for(int i=0;i<;i++){
      |                   ^~