Language: C++

#include <bits/stdc++.h>                                                                                                using namespace std;                                                                                                                                                                                                                            #define N 100                                                                                                                                                                                                                                   int main(void){                                                                                                                                                                                                                                   int n, A[N];                                                                                                            int i, j, key;                                                                                                                                                                                                                                  scanf("%d", &n);                                                                                                                                                                                                                                for(i=0; i<n; i++){                                                                                                       scanf("%d", &A[i]);                                                                                                     if(i) printf(" %d",A[i]);                                                                                               else  printf("%d", A[i]);                                                                                             }                                                                                                                       printf("\n");                                                                                                                                                                                                                                   for(i=1; i<n; i++){                                                                                                       key=A[i];                                                                                                               j=i-1;                                                                                                                                                                                                                                          while(j >= 0 && A[j] > key){                                                                                              A[j+1]=A[j];                                                                                                            j--;                                                                                                                  }                                                                                                                       A[j+1]=key;                                                                                                                                                                                                                                     for(j=0; j<n; j++){                                                                                                       if(j) printf(" %d", A[j]);                                                                                              else  printf("%d", A[j]);                                                                                             }                                                                                                                       printf("\n");                                                                                                         }                                                                                                                                                                                                                                               return 0;                                                                                                             } 



Compiler output:
a.cc:1:121: warning: extra tokens at end of #include directive
    1 | #include <bits/stdc++.h>                                                                                                using namespace std;                                                                                                                                                                                                                            #define N 100                                                                                                                                                                                                                                   int main(void){                                                                                                                                                                                                                                   int n, A[N];                                                                                                            int i, j, key;                                                                                                                                                                                                                                  scanf("%d", &n);                                                                                                                                                                                                                                for(i=0; i<n; i++){                                                                                                       scanf("%d", &A[i]);                                                                                                     if(i) printf(" %d",A[i]);                                                                                               else  printf("%d", A[i]);                                                                                             }                                                                                                                       printf("\n");                                                                                                                                                                                                                                   for(i=1; i<n; i++){                                                                                                       key=A[i];                                                                                                               j=i-1;                                                                                                                                                                                                                                          while(j >= 0 && A[j] > key){                                                                                              A[j+1]=A[j];                                                                                                            j--;                                                                                                                  }                                                                                                                       A[j+1]=key;                                                                                                                                                                                                                                     for(j=0; j<n; j++){                                                                                                       if(j) printf(" %d", A[j]);                                                                                              else  printf("%d", A[j]);                                                                                             }                                                                                                                       printf("\n");                                                                                                         }                                                                                                                                                                                                                                               return 0;                                                                                                             }
      |                                                                                                                         ^~~~~
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status