Language: C

Last login: Sun Jun 18 22:37:51 on ttys000
tomejoutomokinoMacBook-Air:~ tomebatomoki$ cd aoj
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ls
AojIntro1A.c	AojIntro1C.c~	AojIntro2B.c	AojIntro2D.c~	a.out
AojIntro1A.c~	AojIntro1D.c	AojIntro2B.c~	AojIntro3A.c
AojIntro1B.c	AojIntro1D.c~	AojIntro2C.c	AojIntro3A.c~
AojIntro1B.c~	AojIntro2A.c	AojIntro2C.c~	AojIntro3B.c
AojIntro1C.c	AojIntro2A.c~	AojIntro2D.c	AojIntro3B.c~
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
1
2
3
5
4
6
7
3
6
5
7
5
3
4
0
Case 1 : 1
Case 2 : 2
Case 3 : 3
Case 4 : 5
Case 5 : 4
Case 6 : 6
Case 7 : 7
Case 8 : 3
Case 9 : 6
Case 10 : 5
Case 11 : 7
Case 12 : 5
Case 13 : 3
Case 14 : 4
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3
5
11
7
8
19
0
Case 1 :  3
Case 2 :  5
Case 3 : 11
Case 4 :  7
Case 5 :  8
Case 6 : 19
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ stty erase ^H
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ stty erase ^H
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3
5
11
7
8
19
0
Case 1 :  0
Case 2 :  0
Case 3 :  0
Case 4 :  0
Case 5 :  0
Case 6 :  0
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3
5
11
7
8
19
0
Case 1 :  3
Case 2 :  5
Case 3 : 11
Case 4 :  7
Case 5 :  8
Case 6 : 19
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3
5
11
7
8
19
0
Case 1 : 3
Case 2 : 5
Case 3 : 11
Case 4 : 7
Case 5 : 8
Case 6 : 19
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3
5
11
7
8
19
0
Case 1 : 3
Case 2 : 5
Case 3 : 11
Case 4 : 7
Case 5 : 8
Case 6 : 19
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
68
20
0
Case 1 : 68
Case 2 : 20
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ seq 0 > AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
AojIntro3B.c:7:7: error: use of undeclared identifier 'I'
  for(I=1; I<10000; i++) {
      ^
AojIntro3B.c:7:12: error: use of undeclared identifier 'I'
  for(I=1; I<10000; i++) {
           ^
2 errors generated.
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro3B.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
1 2 3 4 5 6 7  8 9 0
Case 1: 1
Case 2: 2
Case 3: 3
Case 4: 4
Case 5: 5
Case 6: 6
Case 7: 7
Case 8: 8
Case 9: 9
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ls
#AojIntro3B.c#	AojIntro1C.c~	AojIntro2B.c~	AojIntro3A.c~
AojIntro1A.c	AojIntro1D.c	AojIntro2C.c	AojIntro3B.c
AojIntro1A.c~	AojIntro1D.c~	AojIntro2C.c~	AojIntro3B.c~
AojIntro1B.c	AojIntro2A.c	AojIntro2D.c	a.out
AojIntro1B.c~	AojIntro2A.c~	AojIntro2D.c~
AojIntro1C.c	AojIntro2B.c	AojIntro3A.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro2C.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs testNao.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc testNao.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
 3 ^C
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3 1 2
1 2 3 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3 2 1
2 1 3 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs testNao.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc testNao.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3 2 1
1 2 3 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs testNao.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro2C.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ gcc AojIntro2C.c
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
3 2 1
1 2 3 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ ./a.out
45 34 01
1 34 45 
tomejoutomokinoMacBook-Air:aoj tomebatomoki$ emacs AojIntro2C.c

        if(a[i]>a[j]){
          min=a[i];
          a[i]=a[j];
          a[j]=min;
	}
      }
    }
  }
  for(i=0;i<3;i++){
    printf("%d ",a[i]);
  }
  printf("\n");
  return 0;
}

Compiler output:
main.c:1:1: error: unknown type name 'Last'
    1 | Last login: Sun Jun 18 22:37:51 on ttys000
      | ^~~~
main.c:1:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | Last login: Sun Jun 18 22:37:51 on ttys000
      |           ^
main.c:140:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
  140 |   for(I=1; I<10000; i++) {
      |             ^
main.c:140:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
  140 |   for(I=1; I<10000; i++) {
      |                      ^~
main.c:160:2: error: invalid preprocessing directive #AojIntro3B
  160 | #AojIntro3B.c#  AojIntro1C.c~   AojIntro2B.c~   AojIntro3A.c~
      |  ^~~~~~~~~~
main.c:200:3: error: expected identifier or '(' before '}' token
  200 |   }
      |   ^
main.c:201:3: error: expected identifier or '(' before 'for'
  201 |   for(i=0;i<3;i++){
      |   ^~~
main.c:201:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
  201 |   for(i=0;i<3;i++){
      |            ^
main.c:201:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token
  201 |   for(i=0;i<3;i++){
      |                ^~
main.c:204:10: error: expected declaration specifiers or '...' before string constant
  204 |   printf("\n");
      |          ^~~~
main.c:205:3: error: expected identifier or '(' before 'return'
  205 |   return 0;
      |   ^~~~~~
main.c:206:1: error: expected identifier or '(' before '}' token
  206 | }
      | ^