Language: C++

int main()
{
  std::string S;
  std::cin >> S;
  if(S = 'SUN')
     std::cout << "7" << std::endl;
   if(S = 'MON')
     std::cout << "6" << std::endl;
      if(S = 'TUE')
     std::cout << "5" << std::endl;
         if(S = 'WED')
     std::cout << "4" << std::endl;
     if(S = 'THU')
     std::cout << "3" << std::endl;
        if(S = 'FRI')
     std::cout << "2" << std::endl;
           if(S = 'SAT')
     std::cout << "1" << std::endl;
              
              return 0;
              }

Compiler output:
a.cc:5:10: warning: multi-character character constant [-Wmultichar]
    5 |   if(S = 'SUN')
      |          ^~~~~
a.cc:7:11: warning: multi-character character constant [-Wmultichar]
    7 |    if(S = 'MON')
      |           ^~~~~
a.cc:9:14: warning: multi-character character constant [-Wmultichar]
    9 |       if(S = 'TUE')
      |              ^~~~~
a.cc:11:17: warning: multi-character character constant [-Wmultichar]
   11 |          if(S = 'WED')
      |                 ^~~~~
a.cc:13:13: warning: multi-character character constant [-Wmultichar]
   13 |      if(S = 'THU')
      |             ^~~~~
a.cc:15:16: warning: multi-character character constant [-Wmultichar]
   15 |         if(S = 'FRI')
      |                ^~~~~
a.cc:17:19: warning: multi-character character constant [-Wmultichar]
   17 |            if(S = 'SAT')
      |                   ^~~~~
a.cc: In function 'int main()':
a.cc:3:8: error: 'string' is not a member of 'std'
    3 |   std::string S;
      |        ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | int main()
a.cc:4:8: error: 'cin' is not a member of 'std'
    4 |   std::cin >> S;
      |        ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | int main()
a.cc:4:15: error: 'S' was not declared in this scope
    4 |   std::cin >> S;
      |               ^
a.cc:6:11: error: 'cout' is not a member of 'std'
    6 |      std::cout << "7" << std::endl;
      |           ^~~~
a.cc:6:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:6:31: error: 'endl' is not a member of 'std'
    6 |      std::cout << "7" << std::endl;
      |                               ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | int main()
a.cc:8:11: error: 'cout' is not a member of 'std'
    8 |      std::cout << "6" << std::endl;
      |           ^~~~
a.cc:8:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:31: error: 'endl' is not a member of 'std'
    8 |      std::cout << "6" << std::endl;
      |                               ^~~~
a.cc:8:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:10:11: error: 'cout' is not a member of 'std'
   10 |      std::cout << "5" << std::endl;
      |           ^~~~
a.cc:10:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:31: error: 'endl' is not a member of 'std'
   10 |      std::cout << "5" << std::endl;
      |                               ^~~~
a.cc:10:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:12:11: error: 'cout' is not a member of 'std'
   12 |      std::cout << "4" << std::endl;
      |           ^~~~
a.cc:12:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:12:31: error: 'endl' is not a member of 'std'
   12 |      std::cout << "4" << std::endl;
      |                               ^~~~
a.cc:12:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:11: error: 'cout' is not a member of 'std'
   14 |      std::cout << "3" << std::endl;
      |           ^~~~
a.cc:14:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:31: error: 'endl' is not a member of 'std'
   14 |      std::cout << "3" << std::endl;
      |                               ^~~~
a.cc:14:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:16:11: error: 'cout' is not a member of 'std'
   16 |      std::cout << "2" << std::endl;
      |           ^~~~
a.cc:16:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:16:31: error: 'endl' is not a member of 'std'
   16 |      std::cout << "2" << std::endl;
      |                               ^~~~
a.cc:16:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:18:11: error: 'cout' is not a member of 'std'
   18 |      std::cout << "1" << std::endl;
      |           ^~~~
a.cc:18:11: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:31: error: 'endl' is not a member of 'std'
   18 |      std::cout << "1" << std::endl;
      |                               ^~~~
a.cc:18:31: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'