Language: C++

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