Language: C++

#include <stdio.h>
using namespace std;

struct Card{char suit,value};

void bubble(struct Card A[],int N){

 for(int i=0;i<N;i++){
  for(int j=N-1;j>=i;j--){
 if(A[j].value<A[j-1].value){
   Card t=A[j];A[j]=A[j-1];A[j-1]=t;
}
}
}
}

void selection(struct Card A[],int N){
  for(int i=0;i<N;i++){
 int minj=i;
 for(int j=i;j<N;j++){
 if(A[j].value<A[minj].value)minj=j;
}
Card t =A[i];A[i]=A[minj];A[minj]=t;
}
}
 
void print(struct Card A[],int N){
 for(int i=0;i<N;i++){
 if(i>0) cout <<" ";
cout << A[i].suit <<A[i].value;
}
cout << endl;
}

bool isStable(struct Card C1[],struct Card C2[],int N){
 for(int i=0;i<N;i++){
 if(C1[i].suit !=C2[i].suit) return false;
}
return true;
}

int main(){
 Card C1[100],C2[100];
int N;
char ch;

cin >>N;
for(int i=0;i<N;i++){
 cin >> C1[i].suit >>C1[i].value;

for(int i=0;i<N;i++) C2[i]=C1[i];

bubble(C1,N);
selection(C2,N);

print(C1,N);
cout << "Stable" <<endl;
}
else{
cout << "Not stable" << endl;
}

return 0;
}

Compiler output:
a.cc:4:23: error: expected ';' at end of member declaration
    4 | struct Card{char suit,value};
      |                       ^~~~~
      |                            ;
a.cc: In function 'void print(Card*, int)':
a.cc:29:10: error: 'cout' was not declared in this scope
   29 |  if(i>0) cout <<" ";
      |          ^~~~
a.cc:2:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <stdio.h>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:30:1: error: 'cout' was not declared in this scope
   30 | cout << A[i].suit <<A[i].value;
      | ^~~~
a.cc:30:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:1: error: 'cout' was not declared in this scope
   32 | cout << endl;
      | ^~~~
a.cc:32:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:32:9: error: 'endl' was not declared in this scope
   32 | cout << endl;
      |         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <stdio.h>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc: In function 'int main()':
a.cc:47:1: error: 'cin' was not declared in this scope
   47 | cin >>N;
      | ^~~
a.cc:47:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:57:1: error: 'cout' was not declared in this scope
   57 | cout << "Stable" <<endl;
      | ^~~~
a.cc:57:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:57:20: error: 'endl' was not declared in this scope
   57 | cout << "Stable" <<endl;
      |                    ^~~~
a.cc:57:20: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:59:1: error: 'else' without a previous 'if'
   59 | else{
      | ^~~~
a.cc:60:1: error: 'cout' was not declared in this scope
   60 | cout << "Not stable" << endl;
      | ^~~~
a.cc:60:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:60:25: error: 'endl' was not declared in this scope
   60 | cout << "Not stable" << endl;
      |                         ^~~~
a.cc:60:25: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'