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:3:15: error: expected ')' before '}' token
    3 |   if(S = 'SUN'}
      |     ~         ^
      |               )
a.cc:3:15: error: expected primary-expression before '}' token
a.cc: At global scope:
a.cc:4:11: error: 'cout' in namespace 'std' does not name a type
    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:5:4: error: expected unqualified-id before 'if'
    5 |    if(S = 'MON'}
      |    ^~
a.cc:5:16: error: expected declaration before '}' token
    5 |    if(S = 'MON'}
      |                ^
a.cc:6:11: error: 'cout' in namespace 'std' does not name a type
    6 |      std::cout << "6" << std::endl;
      |           ^~~~
a.cc:6:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    6 |      std::cout << "6" << std::endl;
      |      ^~~
a.cc:7:7: error: expected unqualified-id before 'if'
    7 |       if(S = 'TUE'}
      |       ^~
a.cc:7:19: error: expected declaration before '}' token
    7 |       if(S = 'TUE'}
      |                   ^
a.cc:8:11: error: 'cout' in namespace 'std' does not name a type
    8 |      std::cout << "5" << std::endl;
      |           ^~~~
a.cc:8:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    8 |      std::cout << "5" << std::endl;
      |      ^~~
a.cc:9:10: error: expected unqualified-id before 'if'
    9 |          if(S = 'WED'}
      |          ^~
a.cc:9:22: error: expected declaration before '}' token
    9 |          if(S = 'WED'}
      |                      ^
a.cc:10:11: error: 'cout' in namespace 'std' does not name a type
   10 |      std::cout << "4" << std::endl;
      |           ^~~~
a.cc:10:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   10 |      std::cout << "4" << std::endl;
      |      ^~~
a.cc:11:6: error: expected unqualified-id before 'if'
   11 |      if(S = 'THU'}
      |      ^~
a.cc:11:18: error: expected declaration before '}' token
   11 |      if(S = 'THU'}
      |                  ^
a.cc:12:11: error: 'cout' in namespace 'std' does not name a type
   12 |      std::cout << "3" << std::endl;
      |           ^~~~
a.cc:12:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   12 |      std::cout << "3" << std::endl;
      |      ^~~
a.cc:13:9: error: expected unqualified-id before 'if'
   13 |         if(S = 'FRI'}
      |         ^~
a.cc:13:21: error: expected declaration before '}' token
   13 |         if(S = 'FRI'}
      |                     ^
a.cc:14:11: error: 'cout' in namespace 'std' does not name a type
   14 |      std::cout << "2" << std::endl;
      |           ^~~~
a.cc:14:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   14 |      std::cout << "2" << std::endl;
      |      ^~~
a.cc:15:12: error: expected unqualified-id before 'if'
   15 |            if(S = 'SAT'}
      |            ^~
a.cc:15:24: error: expected declaration before '}' token
   15 |            if(S = 'SAT'}
      |                        ^
a.cc:16:11: error: 'cout' in namespace 'std' does not name a type
   16 |      std::cout << "1" << std::endl;
      |           ^~~~
a.cc:16:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
   16 |      std::cout << "1" << std::endl;
      |      ^~~
a.cc:18:15: error: expected unqualified-id before 'return'
   18 |               return 0;
      |               ^~~~~~
a.cc:19:15: error: expected declaration before '}' token
   19 |               }
      |               ^