Language: C++

#include<iostream>
using namespase 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 + 1; 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;
 print(C2,N):
  if(isStable(C1,C2,N)){
    cout << "Stable" << ebdl;
  }
  else{
    cout << "Not Stable" << ebdl;
  }

  return 0;
}



Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namespase'
    2 | using namespase std;
      |       ^~~~~~~~~
a.cc: In function 'void print(Card*, int)':
a.cc:32:15: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   32 |     if( i > 0)cout << " ";
      |               ^~~~
      |               std::cout
In file included from a.cc:1:
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:33:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   33 |     cout << A[i].suit << A[i].value;
      |     ^~~~
      |     std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:35:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   35 |   cout << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:35:11: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   35 |   cout << endl;
      |           ^~~~
      |           std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc: In function 'int main()':
a.cc:50:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   50 |   cin >> N;
      |   ^~~
      |   std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:61:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   61 |   cout << "Stable" << endl;
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:61:23: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   61 |   cout << "Stable" << endl;
      |                       ^~~~
      |                       std::endl
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
a.cc:62:13: error: expected ';' before ':' token
   62 |  print(C2,N):
      |             ^
      |             ;
a.cc:66:3: error: 'else' without a previous 'if'
   66 |   else{
      |   ^~~~
a.cc:67:29: error: 'ebdl' was not declared in this scope
   67 |     cout << "Not Stable" << ebdl;
      |                             ^~~~