Language: C++

#include <bits/stdc++.h>
using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"MON"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if (s = "MON") {
      |       ~~^~~~~~~
      |         |
      |         std::__cxx11::basic_string<char>
a.cc:9:22: error: expected ';' before ':' token
    9 |     cout << 6 << endl:
      |                      ^
      |                      ;
a.cc:11:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"TUE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |   else if (s = "TUE") {
      |            ~~^~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:12:22: error: expected ';' before ':' token
   12 |     cout << 5 << endl:
      |                      ^
      |                      ;
a.cc:14:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"WED"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   else if (s = "WED") {
      |            ~~^~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:15:22: error: expected ';' before ':' token
   15 |     cout << 4 << endl:
      |                      ^
      |                      ;
a.cc:17:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"THU"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   17 |   else if (s = "THU") {
      |            ~~^~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:18:22: error: expected ';' before ':' token
   18 |     cout << 3 << endl:
      |                      ^
      |                      ;
a.cc:20:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"FRI"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   20 |   else if (s = "FRI") {
      |            ~~^~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:21:22: error: expected ';' before ':' token
   21 |     cout << 2 << endl:
      |                      ^
      |                      ;
a.cc:23:14: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"SAT"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   23 |   else if (s = "SAT") {
      |            ~~^~~~~~~
      |              |
      |              std::__cxx11::basic_string<char>
a.cc:24:22: error: expected ';' before ':' token
   24 |     cout << 1 << endl:
      |                      ^
      |                      ;
a.cc:27:22: error: expected ';' before ':' token
   27 |     cout << 7 << endl:
      |                      ^
      |                      ;