Language: C

#include<stdio.h>
 
int bubble()
{
 int i, j, kosuu, box1, num[40];
 char box2, mark[40]; 

//???????????¨???
 for(i = 1;i <= kosuu;i++) {
   for(j = kosuu;j > i;j--) {
     if (num[j] < num[j-1]) {
       box1      = num[j-1];
       box2      = mark[j-1];      
       num[j-1] = num[j];
       mark[j-1] = mark[j];
       num[j]    = box;
       mark[j]    = box;
     }
   }
 }

//??¨???
 for(i = 1;i < kosuu;i++){
   printf("%c%d ", mark[i], num[i])
 }
 printf("%c%d\n", mark[kosuu], num[kosuu])
 return 0;
}

int select()
 int i, j, kosuu, num[101],  min, minnum, box1;
 char mark[40], box2;
 
//???????????¨???????????????
 for(i = 1;i <= kosuu;i++){
   min = num[i];
   for(j = i + 1;j <= kosuu;j++){
     if(num[j] < min){
       min = num[j];
       minnum = j;
     }
   }
   if(min < num[i]){
      box  = num[i];
      num[i] = min;
      num[minnum]  = box;
   }
 }

//??¨???
 for(i = 1;i < kosuu;i++){
   printf("%c%d ", a[i]);
 }
 printf("%d\n%d\n", a[kosuu], CGcount);

int main()
{
 int i, kosuu, cardnum[40];
 char cardmark[40];
 
 scanf("%d", &kosuu);
 
 for(i = 1;i <=kosuu; i++){ 
   scanf("%c%d ", cardmark[i], cardnum[i]);
 }
 
 bubble(kosuu, cardmark[40], cardnum[40]);
 select(kosuu, cardmark[40], cardnum[40]);
 return 0;
} 

Compiler output:
main.c: In function 'bubble':
main.c:16:20: error: 'box' undeclared (first use in this function); did you mean 'box2'?
   16 |        num[j]    = box;
      |                    ^~~
      |                    box2
main.c:16:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:24:36: error: expected ';' before '}' token
   24 |    printf("%c%d ", mark[i], num[i])
      |                                    ^
      |                                    ;
   25 |  }
      |  ~                                  
main.c:26:43: error: expected ';' before 'return'
   26 |  printf("%c%d\n", mark[kosuu], num[kosuu])
      |                                           ^
      |                                           ;
   27 |  return 0;
      |  ~~~~~~                                    
main.c: In function 'select':
main.c:35:2: error: expected declaration specifiers before 'for'
   35 |  for(i = 1;i <= kosuu;i++){
      |  ^~~
main.c:35:12: error: expected declaration specifiers before 'i'
   35 |  for(i = 1;i <= kosuu;i++){
      |            ^
main.c:35:23: error: expected declaration specifiers before 'i'
   35 |  for(i = 1;i <= kosuu;i++){
      |                       ^
main.c:51:2: error: expected declaration specifiers before 'for'
   51 |  for(i = 1;i < kosuu;i++){
      |  ^~~
main.c:51:12: error: expected declaration specifiers before 'i'
   51 |  for(i = 1;i < kosuu;i++){
      |            ^
main.c:51:22: error: expected declaration specifiers before 'i'
   51 |  for(i = 1;i < kosuu;i++){
      |                      ^
main.c:54:2: error: expected declaration specifiers before 'printf'
   54 |  printf("%d\n%d\n", a[kosuu], CGcount);
      |  ^~~~~~
main.c:57:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   57 | {
      | ^
main.c:32:17: error: declaration for parameter 'box2' but no such parameter
   32 |  char mark[40], box2;
      |                 ^~~~
main.c:32:7: error: declaration for parameter 'mark' but no such parameter
   32 |  char mark[40], box2;
      |       ^~~~
main.c:31:43: error: declaration for parameter 'box1' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |                                           ^~~~
main.c:31:35: error: declaration for parameter 'minnum' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |                                   ^~~~~~
main.c:31:30: error: declaration for parameter 'min' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |                              ^~~
main.c:31:19: error: declaration for parameter 'num' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |                   ^~~
main.c:31:12: error: declaration for parameter 'kosuu' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |            ^~~~~
main.c:31:9: error: declaration for parameter 'j' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |         ^
main.c:31:6: error: declaration for parameter 'i' but no such parameter
   31 |  int i, j, kosuu, num[101],  min, minnum, box1;
      |      ^
main.c:71: error: expected '{' at end of input