Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  string S;
  cin >> S;

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


Compiler output:
a.cc:8:10: error: extended character ‘ is not valid in an identifier
    8 | if (S == ‘SUN’){
      |          ^
a.cc:8:10: error: extended character ’ is not valid in an identifier
a.cc:9:13: error: extended character “ is not valid in an identifier
    9 |     cout << “7” << endl;
      |             ^
a.cc:9:13: error: extended character ” is not valid in an identifier
a.cc:11:10: error: extended character ‘ is not valid in an identifier
   11 | if (S == ‘MON’){
      |          ^
a.cc:11:10: error: extended character ’ is not valid in an identifier
a.cc:12:13: error: extended character “ is not valid in an identifier
   12 |     cout << “6” << endl;
      |             ^
a.cc:12:13: error: extended character ” is not valid in an identifier
a.cc:14:10: error: extended character ‘ is not valid in an identifier
   14 | if (S == ‘TUE’){
      |          ^
a.cc:14:10: error: extended character ’ is not valid in an identifier
a.cc:15:13: error: extended character “ is not valid in an identifier
   15 |     cout << “5” << endl;
      |             ^
a.cc:15:13: error: extended character ” is not valid in an identifier
a.cc:17:10: error: extended character ‘ is not valid in an identifier
   17 | if (S == ‘WED’){
      |          ^
a.cc:17:10: error: extended character ’ is not valid in an identifier
a.cc:18:13: error: extended character “ is not valid in an identifier
   18 |     cout << “4” << endl;
      |             ^
a.cc:18:13: error: extended character ” is not valid in an identifier
a.cc:20:10: error: extended character ‘ is not valid in an identifier
   20 | if (S == ‘THU’){
      |          ^
a.cc:20:10: error: extended character ’ is not valid in an identifier
a.cc:21:13: error: extended character “ is not valid in an identifier
   21 |     cout << “3” << endl;
      |             ^
a.cc:21:13: error: extended character ” is not valid in an identifier
a.cc:23:10: error: extended character ‘ is not valid in an identifier
   23 | if (S == ‘FRI’){
      |          ^
a.cc:23:10: error: extended character ’ is not valid in an identifier
a.cc:24:13: error: extended character “ is not valid in an identifier
   24 |     cout << “2” << endl;
      |             ^
a.cc:24:13: error: extended character ” is not valid in an identifier
a.cc:26:10: error: extended character ‘ is not valid in an identifier
   26 | if (S == ‘SAT’){
      |          ^
a.cc:26:10: error: extended character ’ is not valid in an identifier
a.cc:27:13: error: extended character “ is not valid in an identifier
   27 |     cout << “1” << endl;
      |             ^
a.cc:27:13: error: extended character ” is not valid in an identifier
a.cc: In function 'int main()':
a.cc:8:10: error: '\U00002018SUN\U00002019' was not declared in this scope
    8 | if (S == ‘SUN’){
      |          ^~~~~
a.cc:9:13: error: '\U0000201c7\U0000201d' was not declared in this scope
    9 |     cout << “7” << endl;
      |             ^~~
a.cc:11:10: error: '\U00002018MON\U00002019' was not declared in this scope
   11 | if (S == ‘MON’){
      |          ^~~~~
a.cc:12:13: error: '\U0000201c6\U0000201d' was not declared in this scope
   12 |     cout << “6” << endl;
      |             ^~~
a.cc:14:10: error: '\U00002018TUE\U00002019' was not declared in this scope
   14 | if (S == ‘TUE’){
      |          ^~~~~
a.cc:15:13: error: '\U0000201c5\U0000201d' was not declared in this scope
   15 |     cout << “5” << endl;
      |             ^~~
a.cc:17:10: error: '\U00002018WED\U00002019' was not declared in this scope
   17 | if (S == ‘WED’){
      |          ^~~~~
a.cc:18:13: error: '\U0000201c4\U0000201d' was not declared in this scope
   18 |     cout << “4” << endl;
      |             ^~~
a.cc:20:10: error: '\U00002018THU\U00002019' was not declared in this scope
   20 | if (S == ‘THU’){
      |          ^~~~~
a.cc:21:13: error: '\U0000201c3\U0000201d' was not declared in this scope
   21 |     cout << “3” << endl;
      |             ^~~
a.cc:23:10: error: '\U00002018FRI\U00002019' was not declared in this scope
   23 | if (S == ‘FRI’){
      |          ^~~~~
a.cc:24:13: error: '\U0000201c2\U0000201d' was not declared in this scope
   24 |     cout << “2” << endl;
      |             ^~~
a.cc:26:10: error: '\U00002018SAT\U00002019' was not declared in this scope
   26 | if (S == ‘SAT’){
      |          ^~~~~
a.cc:27:13: error: '\U0000201c1\U0000201d' was not declared in this scope
   27 |     cout << “1” << endl;
      |             ^~~