Language: C

Last login: Tue Jun 27 11:26:07 on console
tomejoutomokinoMacBook-Air:~ tomebatomoki$ cd aoj
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ls
#AojIntro2.c#	AojIntro1B.c~	AojIntro2B.c~	AojIntro3B.c~	AojIntro4B.c~	AojIntro5B.c~	AojIntro6B.c~	AojIntro7B.c~
#AojIntro3B.c#	AojIntro1C.c	AojIntro2C.c	AojIntro3C.c	AojIntro4C.c	AojIntro5C.c	AojIntro6C.c	a.out
#AojIntro4D.c#	AojIntro1C.c~	AojIntro2C.c~	AojIntro3C.c~	AojIntro4C.c~	AojIntro5C.c~	AojIntro6C.c~	test.c
#AojIntro5D.c#	AojIntro1D.c	AojIntro2D.c	AojIntro3D.c	AojIntro4D.c	AojIntro5D.c	AojIntro6D.c
#AojIntro6C.c#	AojIntro1D.c~	AojIntro2D.c~	AojIntro3D.c~	AojIntro4D.c~	AojIntro5D.c~	AojIntro6D.c~
AojIntro1A.c	AojIntro2A.c	AojIntro3A.c	AojIntro4A.c	AojIntro5A.c	AojIntro6A.c	AojIntro7A.c
AojIntro1A.c~	AojIntro2A.c~	AojIntro3A.c~	AojIntro4A.c~	AojIntro5A.c~	AojIntro6A.c~	AojIntro7A.c~
AojIntro1B.c	AojIntro2B.c	AojIntro3B.c	AojIntro4B.c	AojIntro5B.c	AojIntro6B.c	AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ more 
Missing filename ("less --help" for help)
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ stty erase ^H
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:7:5: error: 'break' statement not in loop or switch statement
    break;
    ^
1 error generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
1 2
2 3
1 2
 2 3
0 0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:13:7: error: expression is not assignable
        i+j+k=x;
        ~~~~~^
1 error generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:13:11: error: expression is not assignable
        if (i+j+k=x){ 
            ~~~~~^
1 error generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
0tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:16:16: warning: ordered comparison between pointer and integer ('int' and 'int *')
    for (i=1; i<=n-2; i++) {
              ~^ ~~~
AojIntro7B.c:17:20: warning: ordered comparison between pointer and integer ('int' and 'int *')
      for (j=i+1; j<=n-1; j++) {
                  ~^ ~~~
AojIntro7B.c:18:15: warning: ordered comparison between pointer and integer ('int' and 'int *')
        for (k=j+1; k<=n; k++) {
                    ~^ ~
AojIntro7B.c:19:13: warning: comparison between pointer and integer ('int' and 'int *')
          if (i+j+k==x){ 
              ~~~~~^ ~
4 warnings generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3 9


0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
1 3 5
2 3 4
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 15
0 0
0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
8 18
0 0
3 7 8
4 6 8
5 6 7
3
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:1:1: error: unknown type name 'x'
x#include <stdio.h>
^
AojIntro7B.c:1:2: error: expected identifier or '('
x#include <stdio.h>
 ^
2 errors generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
1 3 5
2 3 4
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
AojIntro7B.c:22:17: error: use of undeclared identifier 'g'
              count1++;g
                       ^
1 error generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
5 9
0 0
4
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
5 9
0 0
4
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
0 0
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
5 9
0 0
2
4
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9
5 9
0 0
2
4
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro7B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
5 9 
5 9
0 0
2
2
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c

#include <stdio.h>
int main () {
  int i, j, k, l,  n[100], x[100], count1=0;
  i=0;
  while (1) {
    scanf("%d %d", &n[i], &x[i]);
    if (n[i]==0 && x[i]==0) {
      break;
    }
    i++;
  }
    for (l=0; l<100; l++) {
      if (n[l]==0 && x[l]==0) {
        break;
      }
      count1=0;
      for (i=1; i<=n[l]-2; i++) {
        for (j=i+1; j<=n[l]-1; j++) {
          for (k=j+1; k<=n[l]; k++) {
            if (i+j+k==x[l]){                          
              count1++;
            }
          }
        }
      }

      printf("%d\n", count1);
    }

    return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'Last'
    1 | Last login: Tue Jun 27 11:26:07 on console
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | Last login: Tue Jun 27 11:26:07 on console
      |           ^
main.c:4:2: error: invalid preprocessing directive #AojIntro2
    4 | #AojIntro2.c#   AojIntro1B.c~   AojIntro2B.c~   AojIntro3B.c~   AojIntro4B.c~   AojIntro5B.c~   AojIntro6B.c~   AojIntro7B.c~
      |  ^~~~~~~~~
main.c:5:2: error: invalid preprocessing directive #AojIntro3B
    5 | #AojIntro3B.c#  AojIntro1C.c    AojIntro2C.c    AojIntro3C.c    AojIntro4C.c    AojIntro5C.c    AojIntro6C.c    a.out
      |  ^~~~~~~~~~
main.c:6:2: error: invalid preprocessing directive #AojIntro4D
    6 | #AojIntro4D.c#  AojIntro1C.c~   AojIntro2C.c~   AojIntro3C.c~   AojIntro4C.c~   AojIntro5C.c~   AojIntro6C.c~   test.c
      |  ^~~~~~~~~~
main.c:7:2: error: invalid preprocessing directive #AojIntro5D
    7 | #AojIntro5D.c#  AojIntro1D.c    AojIntro2D.c    AojIntro3D.c    AojIntro4D.c    AojIntro5D.c    AojIntro6D.c
      |  ^~~~~~~~~~
main.c:8:2: error: invalid preprocessing directive #AojIntro6C
    8 | #AojIntro6C.c#  AojIntro1D.c~   AojIntro2D.c~   AojIntro3D.c~   AojIntro4D.c~   AojIntro5D.c~   AojIntro6D.c~
      |  ^~~~~~~~~~
main.c:20:26: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   20 | AojIntro7B.c:7:5: error: 'break' statement not in loop or switch statement
      |                          ^~~~~~~
main.c:22:5: error: expected identifier or '(' before '^' token
   22 |     ^
      |     ^
main.c:36:9: error: expected identifier or '(' before '~' token
   36 |         ~~~~~^
      |         ^
main.c:50:1: error: invalid suffix "tomejoutomokinoMacBook" on integer constant
   50 | 0tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro7B.c
      | ^~~~~~~~~~~~~~~~~~~~~~~
main.c:81:78: warning: multi-character character constant [-Wmultichar]
   81 | AojIntro7B.c:16:16: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                              ^~~~~
main.c:81:88: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   81 | AojIntro7B.c:16:16: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                                        ^~~~~~~
main.c:84:78: warning: multi-character character constant [-Wmultichar]
   84 | AojIntro7B.c:17:20: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                              ^~~~~
main.c:84:88: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   84 | AojIntro7B.c:17:20: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                                        ^~~~~~~
main.c:87:78: warning: multi-character character constant [-Wmultichar]
   87 | AojIntro7B.c:18:15: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                              ^~~~~
main.c:87:88: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   87 | AojIntro7B.c:18:15: warning: ordered comparison between pointer and integer ('int' and 'int *')
      |                                                                                        ^~~~~~~
main.c:90:70: warning: multi-character character constant [-Wmultichar]
   90 | AojIntro7B.c:19:13: warning: comparison between pointer and integer ('int' and 'int *')
      |                                                                      ^~~~~
main.c:90:80: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   90 | AojIntro7B.c:19:13: warning: comparison between pointer and integer ('int' and 'int *')
      |                                                                                ^~~~~~~
main.c:135:2: error: stray '#' in program
  135 | x#include <stdio.h>
      |  ^
main.c:138:2: error: stray '#' in program
  138 | x#include <stdio.h>
      |  ^