Language: C++

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define REP(i, n) for(int i = 0; i < n; i++)
void Yn(bool flg){cout<<(flg?"Yes":"No")<<endl;}
void YN(bool flg){cout<<(flg?"YES":"NO")<<endl;}
void yn(bool flg){cout<<(flg?"yes":"no")<<endl;}

signed main(){
  string S;
  cin >> S;
  int a;
  if(S == "SUN") a = 7;
  else(S == "SAT") a = 1;
  else(S == "FRI") a = 2;
  else(S == "THU") a = 3;
  else(S == "WED") a = 4;
  else(S == "TUE") a = 5;
  else(S == "MON") a = 6;
cout << a << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:19: error: expected ';' before 'a'
   14 |   else(S == "SAT") a = 1;
      |                   ^~
      |                   ;
a.cc:14:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   14 |   else(S == "SAT") a = 1;
      |       ~~~^~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:15:3: error: 'else' without a previous 'if'
   15 |   else(S == "FRI") a = 2;
      |   ^~~~
a.cc:15:19: error: expected ';' before 'a'
   15 |   else(S == "FRI") a = 2;
      |                   ^~
      |                   ;
a.cc:15:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   15 |   else(S == "FRI") a = 2;
      |       ~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:16:3: error: 'else' without a previous 'if'
   16 |   else(S == "THU") a = 3;
      |   ^~~~
a.cc:16:19: error: expected ';' before 'a'
   16 |   else(S == "THU") a = 3;
      |                   ^~
      |                   ;
a.cc:16:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   16 |   else(S == "THU") a = 3;
      |       ~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:17:3: error: 'else' without a previous 'if'
   17 |   else(S == "WED") a = 4;
      |   ^~~~
a.cc:17:19: error: expected ';' before 'a'
   17 |   else(S == "WED") a = 4;
      |                   ^~
      |                   ;
a.cc:17:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   17 |   else(S == "WED") a = 4;
      |       ~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:18:3: error: 'else' without a previous 'if'
   18 |   else(S == "TUE") a = 5;
      |   ^~~~
a.cc:18:19: error: expected ';' before 'a'
   18 |   else(S == "TUE") a = 5;
      |                   ^~
      |                   ;
a.cc:18:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   18 |   else(S == "TUE") a = 5;
      |       ~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:19:3: error: 'else' without a previous 'if'
   19 |   else(S == "MON") a = 6;
      |   ^~~~
a.cc:19:19: error: expected ';' before 'a'
   19 |   else(S == "MON") a = 6;
      |                   ^~
      |                   ;
a.cc:19:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   19 |   else(S == "MON") a = 6;
      |       ~~~^~~~~~~~~
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~