Language: C++

int main() {
	char day[2];
	scanf("%s", day);
	
		if(day == 'SUN') 
		{ printf("%d", 7); 
		}
	    if (day == 'MON')
		{
			printf("%d", 6);
		}
		if (day == 'TUE')
		{
			printf("%d", 5);
		}
		if (day == 'WED')
		{
			printf("%d", 4);
		}
		if (day == 'THU')
		{
			printf("%d", 3);
		}
		if (day == 'FRI')
		{
			printf("%d", 2);
		}
		if (day == 'SAT')
		{
			printf("%d", 1);
		}
}

Compiler output:
a.cc:5:27: warning: multi-character character constant [-Wmultichar]
    5 |                 if(day == 'SUN')
      |                           ^~~~~
a.cc:8:24: warning: multi-character character constant [-Wmultichar]
    8 |             if (day == 'MON')
      |                        ^~~~~
a.cc:12:28: warning: multi-character character constant [-Wmultichar]
   12 |                 if (day == 'TUE')
      |                            ^~~~~
a.cc:16:28: warning: multi-character character constant [-Wmultichar]
   16 |                 if (day == 'WED')
      |                            ^~~~~
a.cc:20:28: warning: multi-character character constant [-Wmultichar]
   20 |                 if (day == 'THU')
      |                            ^~~~~
a.cc:24:28: warning: multi-character character constant [-Wmultichar]
   24 |                 if (day == 'FRI')
      |                            ^~~~~
a.cc:28:28: warning: multi-character character constant [-Wmultichar]
   28 |                 if (day == 'SAT')
      |                            ^~~~~
a.cc: In function 'int main()':
a.cc:3:9: error: 'scanf' was not declared in this scope
    3 |         scanf("%s", day);
      |         ^~~~~
a.cc:5:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |                 if(day == 'SUN')
      |                    ~~~~^~~~~~~~
a.cc:6:19: error: 'printf' was not declared in this scope
    6 |                 { printf("%d", 7);
      |                   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main() {
a.cc:8:21: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |             if (day == 'MON')
      |                 ~~~~^~~~~~~~
a.cc:10:25: error: 'printf' was not declared in this scope
   10 |                         printf("%d", 6);
      |                         ^~~~~~
a.cc:10:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:12:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 if (day == 'TUE')
      |                     ~~~~^~~~~~~~
a.cc:14:25: error: 'printf' was not declared in this scope
   14 |                         printf("%d", 5);
      |                         ^~~~~~
a.cc:14:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:16:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |                 if (day == 'WED')
      |                     ~~~~^~~~~~~~
a.cc:18:25: error: 'printf' was not declared in this scope
   18 |                         printf("%d", 4);
      |                         ^~~~~~
a.cc:18:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:20:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   20 |                 if (day == 'THU')
      |                     ~~~~^~~~~~~~
a.cc:22:25: error: 'printf' was not declared in this scope
   22 |                         printf("%d", 3);
      |                         ^~~~~~
a.cc:22:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:24:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   24 |                 if (day == 'FRI')
      |                     ~~~~^~~~~~~~
a.cc:26:25: error: 'printf' was not declared in this scope
   26 |                         printf("%d", 2);
      |                         ^~~~~~
a.cc:26:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:28:25: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   28 |                 if (day == 'SAT')
      |                     ~~~~^~~~~~~~
a.cc:30:25: error: 'printf' was not declared in this scope
   30 |                         printf("%d", 1);
      |                         ^~~~~~
a.cc:30:25: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'