Language: C++

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

int main() {
  string S;
  cin >> S;

  if(S = 'SAT') cout << 1 << endl;
  if(S = 'FRI') cout << 2 << endl;
  if(S = 'THU') cout << 3 << endl;
  if(S = 'WED') cout << 4 << endl;
  if(S = 'TUE') cout << 5 << endl;
  if(S = 'MON') cout << 6 << endl;
  if(S = 'SUN') cout << 7 << endl;
}



Compiler output:
a.cc:8:10: warning: multi-character character constant [-Wmultichar]
    8 |   if(S = 'SAT') cout << 1 << endl;
      |          ^~~~~
a.cc:9:10: warning: multi-character character constant [-Wmultichar]
    9 |   if(S = 'FRI') cout << 2 << endl;
      |          ^~~~~
a.cc:10:10: warning: multi-character character constant [-Wmultichar]
   10 |   if(S = 'THU') cout << 3 << endl;
      |          ^~~~~
a.cc:11:10: warning: multi-character character constant [-Wmultichar]
   11 |   if(S = 'WED') cout << 4 << endl;
      |          ^~~~~
a.cc:12:10: warning: multi-character character constant [-Wmultichar]
   12 |   if(S = 'TUE') cout << 5 << endl;
      |          ^~~~~
a.cc:13:10: warning: multi-character character constant [-Wmultichar]
   13 |   if(S = 'MON') cout << 6 << endl;
      |          ^~~~~
a.cc:14:10: warning: multi-character character constant [-Wmultichar]
   14 |   if(S = 'SUN') cout << 7 << endl;
      |          ^~~~~
a.cc: In function 'int main()':
a.cc:8:10: warning: overflow in conversion from 'int' to 'char' changes value from '5456212' to '84' [-Woverflow]
    8 |   if(S = 'SAT') cout << 1 << endl;
      |          ^~~~~
a.cc:8:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(84)' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if(S = 'SAT') cout << 1 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:9:10: warning: overflow in conversion from 'int' to 'char' changes value from '4608585' to '73' [-Woverflow]
    9 |   if(S = 'FRI') cout << 2 << endl;
      |          ^~~~~
a.cc:9:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(73)' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |   if(S = 'FRI') cout << 2 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:10:10: warning: overflow in conversion from 'int' to 'char' changes value from '5523541' to '85' [-Woverflow]
   10 |   if(S = 'THU') cout << 3 << endl;
      |          ^~~~~
a.cc:10:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(85)' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |   if(S = 'THU') cout << 3 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:11:10: warning: overflow in conversion from 'int' to 'char' changes value from '5719364' to '68' [-Woverflow]
   11 |   if(S = 'WED') cout << 4 << endl;
      |          ^~~~~
a.cc:11:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(68)' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |   if(S = 'WED') cout << 4 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:12:10: warning: overflow in conversion from 'int' to 'char' changes value from '5526853' to '69' [-Woverflow]
   12 |   if(S = 'TUE') cout << 5 << endl;
      |          ^~~~~
a.cc:12:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(69)' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |   if(S = 'TUE') cout << 5 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:13:10: warning: overflow in conversion from 'int' to 'char' changes value from '5066574' to '78' [-Woverflow]
   13 |   if(S = 'MON') cout << 6 << endl;
      |          ^~~~~
a.cc:13:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(78)' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |   if(S = 'MON') cout << 6 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>
a.cc:14:10: warning: overflow in conversion from 'int' to 'char' changes value from '5461326' to '78' [-Woverflow]
   14 |   if(S = 'SUN') cout << 7 << endl;
      |          ^~~~~
a.cc:14:8: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(78)' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |   if(S = 'SUN') cout << 7 << endl;
      |      ~~^~~~~~~
      |        |
      |        std::__cxx11::basic_string<char>