criyle/codenet-compile-errors huggingface dataset:
Language: C++

#include <iostream>
#include <vector>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    string day;
    cin >> day;

    vector<string> days = {"SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"};

    vector<string>::iterator it;

    it = find(days.begin(), days.end(), day);
    if (it != days.end()) {
        int offset = it - days.begin() + 1;
        cout << offset;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:14: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   17 |     it = find(days.begin(), days.end(), day);
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:17:14: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   17 |     it = find(days.begin(), days.end(), day);
      |          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include <string>
#include <vector>
#include <iostream>
using namespace std;
int main() {
	vector<string> arr = {
		"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"
	};
	string s;
	cin >> s;
	cout << 7 - (find(arr.begin(), arr.end(), s) - arr.begin()) << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: no matching function for call to 'find(std::vector<std::__cxx11::basic_string<char> >::iterator, std::vector<std::__cxx11::basic_string<char> >::iterator, std::string&)'
   11 |         cout << 7 - (find(arr.begin(), arr.end(), s) - arr.begin()) << endl;
      |                      ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:3:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:11:26: note:   '__gnu_cxx::__normal_iterator<std::__cxx11::basic_string<char>*, std::vector<std::__cxx11::basic_string<char> > >' is not derived from 'std::istreambuf_iterator<_CharT>'
   11 |         cout << 7 - (find(arr.begin(), arr.end(), s) - arr.begin()) << endl;
      |                      ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	switch(s)
	{
		case "SUN" : cout<<"7"<<endl;
		             break;

		case "MON" : cout<<"6"<<endl;
                      break;
		case "TUE" : cout<<"5"<<endl;
                      break;
		case "WED" : cout<<"4"<<endl;
                      break;
		case "THU" : cout<<"3"<<endl;
                       break;
		case "FRI" : cout<<"2"<<endl;
                       break;
		case "SAT" : cout<<"1"<<endl;
		             break;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:16: error: switch quantity not an integer
    7 |         switch(s)
      |                ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner scan = new Scanner(System.in);
    String s = scan.next();
    if(s == "SUN") {System.out.println(7)};
    if(s == "MON") {System.out.println(6)};
    if(s == "TUE") {System.out.println(5)};
    if(s == "WED") {System.out.println(4)};
    if(s == "THU") {System.out.println(3)};
    if(s == "FRI") {System.out.println(2)};
    if(s == "SAT") {System.out.println(1)};
    
  }
}


Compiler output:
Main.java:6: error: ';' expected
    if(s == "SUN") {System.out.println(7)};
                                         ^
Main.java:7: error: ';' expected
    if(s == "MON") {System.out.println(6)};
                                         ^
Main.java:8: error: ';' expected
    if(s == "TUE") {System.out.println(5)};
                                         ^
Main.java:9: error: ';' expected
    if(s == "WED") {System.out.println(4)};
                                         ^
Main.java:10: error: ';' expected
    if(s == "THU") {System.out.println(3)};
                                         ^
Main.java:11: error: ';' expected
    if(s == "FRI") {System.out.println(2)};
                                         ^
Main.java:12: error: ';' expected
    if(s == "SAT") {System.out.println(1)};
                                         ^
7 errors
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main()
{
    string s;
    cin>>s;
    
    switch(s)
    {
        case SAT:
            cout<<"1";
        case SUN:
            cout<<"7";
        case MON:
            cout<<"6";    
        case TUE:
            cout<<"5";    
        case WED:
            cout<<"4";    
        case THU:
            cout<<"3";    
        case FRI:
            cout<<"2";       
    
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: switch quantity not an integer
    9 |     switch(s)
      |            ^
a.cc:11:14: error: 'SAT' was not declared in this scope
   11 |         case SAT:
      |              ^~~
a.cc:13:14: error: 'SUN' was not declared in this scope
   13 |         case SUN:
      |              ^~~
a.cc:15:14: error: 'MON' was not declared in this scope
   15 |         case MON:
      |              ^~~
a.cc:17:14: error: 'TUE' was not declared in this scope
   17 |         case TUE:
      |              ^~~
a.cc:19:14: error: 'WED' was not declared in this scope
   19 |         case WED:
      |              ^~~
a.cc:21:14: error: 'THU' was not declared in this scope
   21 |         case THU:
      |              ^~~
a.cc:23:14: error: 'FRI' was not declared in this scope
   23 |         case FRI:
      |              ^~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  string s;
  cin>>s;
  switch(s){
    case "SUN":
      cout<<7;
      break;
      case "MON":
      cout<<6;
      break;
    case "TUE":
      cout<<5;
      break;
    case "WED":
      cout<<4;
      break;
    case "THU":
      cout<<3;
      break;
    case "FRI":
      cout<<2;
      break;
    case "SAT":
      cout<<1;
      break;
  }
  return 0;
}

      


Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: switch quantity not an integer
    7 |   switch(s){
      |          ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {

  int count=0;
  string S; cin>>S;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'SUN' was not declared in this scope
    9 |   if(S==SUN){count=7;}
      |         ^~~
a.cc:10:15: error: 'MON' was not declared in this scope
   10 |   else if (S==MON){count =6;}
      |               ^~~
a.cc:11:15: error: 'TUE' was not declared in this scope
   11 |   else if(S== TUE){count = 5;}
      |               ^~~
a.cc:12:15: error: 'WED' was not declared in this scope
   12 |   else if (S==WED){count =4;}
      |               ^~~
a.cc:13:17: error: 'THU' was not declared in this scope
   13 |     else if (S==THU){count =3;}
      |                 ^~~
a.cc:14:17: error: 'FRI' was not declared in this scope
   14 |     else if (S==FRI){count =2;}
      |                 ^~~
a.cc:15:17: error: 'SAT' was not declared in this scope
   15 |     else if (S==SAT){count =1;}
      |                 ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

int main(){
 string s;
  cin>>s;
  switch(s)
  {
    case "SUN" : cout<<7<<endl;
                  break;
    case "MON":cout<<6<<endl;
      break;
    case "TUE": cout<<5<<endl;
      break;
    case "WED": cout<<4<<endl;
      break;
      case" THU": cout<<3<<endl;
      break;
    case "FRI": cout<<2<<endl;
      break;
    case "SAT": cout<<1<<endl;
      break;
  }
  
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:10: error: switch quantity not an integer
    7 |   switch(s)
      |          ^
Language: C++

#include<iostream>
using namespace std;
int main()
{
  stting a[7]={"SAT","FRI","THU","WED","TUE","MON","SUN"};
  string b;
  cin>>b;
  for(int i=0;i<7;i++){
    if(a[i]==b){
      cout<<i+1<<endl;
      break;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'stting' was not declared in this scope; did you mean 'stdin'?
    5 |   stting a[7]={"SAT","FRI","THU","WED","TUE","MON","SUN"};
      |   ^~~~~~
      |   stdin
a.cc:9:8: error: 'a' was not declared in this scope
    9 |     if(a[i]==b){
      |        ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;

int main() {
  string L[] = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
  string s;
  cin >> s;
  rep(i, 7) {
    if (s == L[i]) {
      cout << 7-i << endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: expected ',' or ';' before 'string'
    7 |   string s;
      |   ^~~~~~
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s;
      |          ^
Language: C++

#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;

int main() {
  string L = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
  string s;
  cin >> s;
  rep(i, 7) {
    if (s == L[i]) {
      cout << 7-i << endl;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:56: error: could not convert '{"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}' from '<brace-enclosed initializer list>' to 'std::string' {aka 'std::__cxx11::basic_string<char>'}
    6 |   string L = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
      |                                                        ^
      |                                                        |
      |                                                        <brace-enclosed initializer list>
a.cc:7:3: error: expected ',' or ';' before 'string'
    7 |   string s;
      |   ^~~~~~
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s;
      |          ^
Language: C++

#includes <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;

int main() {
  string L = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
  string s;
  cin >> s;
  rep(i, 7) {
    if (s == L[i]) {
      cout << 7-i << endl;
    }
  }
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #includes; did you mean #include?
    1 | #includes <bits/stdc++.h>
      |  ^~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   string L = {"SUN","MON","TUE","WED","THU","FRI","SAT"}
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #includes <bits/stdc++.h>
a.cc:7:9: error: expected ';' before 's'
    7 |   string s;
      |         ^~
      |         ;
a.cc:8:3: error: 'cin' was not declared in this scope
    8 |   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 | #includes <bits/stdc++.h>
a.cc:8:10: error: 's' was not declared in this scope
    8 |   cin >> s;
      |          ^
a.cc:10:14: error: 'L' was not declared in this scope
   10 |     if (s == L[i]) {
      |              ^
a.cc:11:7: error: 'cout' was not declared in this scope
   11 |       cout << 7-i << endl;
      |       ^~~~
a.cc:11:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:22: error: 'endl' was not declared in this scope
   11 |       cout << 7-i << endl;
      |                      ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #includes <bits/stdc++.h>
Language: Java

public class Main {
	
	public static void main(String[] args) {
		String[] weekdays = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
		String S;
		int index = 0;
		for (int i = 0; i < weekdays.length; i++) {
			if (weekdays[i].equals(S)) {
				index = i;
				break;
			}
		}
		System.out.println(7 - index);
	}
}

Compiler output:
Main.java:8: error: variable S might not have been initialized
			if (weekdays[i].equals(S)) {
			                       ^
1 error
Language: Java

public class AtCoder {

	public static void main(String[] args) {
		String[] weekdays = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
		String S = "TUE";
		int index = 0;
		for (int i = 0; i < weekdays.length; i++) {
			if (weekdays[i].equals(S)) {
				index = i;
				break;
			}
		}
		System.out.println(7 - index);
	}

}

Compiler output:
Main.java:1: error: class AtCoder is public, should be declared in a file named AtCoder.java
public class AtCoder {
       ^
1 error
Language: C++

#include<iostream>
#include<cstring>

using namespace std;

int main()
{
  char S[5];
  cin >> S;
  char weekdays[7][5] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}
  for(int i = 0; i < 7; i++)
  {
    if (strcmp(S, weekdays[i][3]) == 0)
    {
      cout << 7-i << "\n";
      break;
    }
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:3: error: expected ',' or ';' before 'for'
   11 |   for(int i = 0; i < 7; i++)
      |   ^~~
a.cc:11:18: error: 'i' was not declared in this scope
   11 |   for(int i = 0; i < 7; i++)
      |                  ^
Language: C++

#include <bits/stdc++.h>
#define ALL(a) (a).begin(),(a).end()
#define N_MAX 1000
using namespace std;

int main() {
	string S; cin >> S;
	if (S = "SUN")cout << 7 <<endl;
	if (S = "MUN")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: In function 'int main()':
a.cc:8:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SUN"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |         if (S = "SUN")cout << 7 <<endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:9:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"MUN"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |         if (S = "MUN")cout << 6 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:10:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"TUE"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |         if (S = "TUE")cout << 5 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:11:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"WED"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   11 |         if (S = "WED")cout << 4 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:12:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"THU"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |         if (S = "THU")cout << 3 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:13:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"FRI"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |         if (S = "FRI")cout << 2 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
a.cc:14:15: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"SAT"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   14 |         if (S = "SAT")cout << 1 << endl;
      |             ~~^~~~~~~
      |               |
      |               std::__cxx11::basic_string<char>
Language: Java


import java.util.Scanner;
import java.io.PrintWriter;

public class A_Holiday {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        String s = in.nextLine();
        int ans = 0;
        if(s.equals("SUN")) ans = 7;
        else if(s.equals("MON")) ans = 6;
        else if(s.equals("TUE")) ans = 5;
        else if(s.equals("WED")) ans = 4;
        else if(s.equals("THU")) ans = 3;
        else if(s.equals("FRI")) ans = 2;
        else if(s.equals("SAT")) ans = 1;

        out.println(ans);



    }
}


Compiler output:
Main.java:5: error: class A_Holiday is public, should be declared in a file named A_Holiday.java
public class A_Holiday {
       ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.StringTokenizer;

public class p1 { //christmas gifts
    static StringTokenizer st;
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    public static void main(String[] args)throws IOException {
        String s = next();
        if(s.equals("SUN")){
            System.out.println(7);
        }
        else if(s.equals("SAT")){
            System.out.println(1);
        }
        else if(s.equals("FRI"))
            System.out.println(2);
        else if(s.equals("THU"))
            System.out.println(3);
        else if(s.equals("WED"))
            System.out.println(4);
        else if(s.equals("TUE"))
            System.out.println(5);
        else if(s.equals("MON"))
            System.out.println(6);
    }
    static class Pair {
        int p , s;
        public Pair(int p, int s){
            this.p = p;
            this.s = s;
        }
    }
    static String next() throws IOException{
        while(st==null||!st.hasMoreTokens())
            st = new StringTokenizer(br.readLine().trim());
        return st.nextToken();
    }
    static int readInt() throws IOException{
        return Integer.parseInt(next());
    }
}


Compiler output:
Main.java:8: error: class p1 is public, should be declared in a file named p1.java
public class p1 { //christmas gifts
       ^
1 error
Language: C++

#include <stdio.h>
#include <string.h>

void delete(char *x)
{
	while (*x != '\0')
	{
		if (*x == '\n')
		{
			*x = '\0';
		}
		x++;
	}
}

int main()
{
	char str[10];

	fgets(str, 10, stdin);
	delete(str);

	if (strcmp(str,"SUN") == 0)
	{
		printf("%d\n",7);
	}
	if (strcmp(str, "MON") == 0)
	{
		printf("%d\n", 6);
	}
	if (strcmp(str, "TUE") == 0)
	{
		printf("%d\n", 5);
	}
	if (strcmp(str, "WED") == 0)
	{
		printf("%d\n", 4);
	}
	if (strcmp(str, "THU") == 0)
	{
		printf("%d\n", 3);
	}
	if (strcmp(str, "FRI") == 0)
	{
		printf("%d\n", 2);
	}
	if (strcmp(str, "SAT") == 0)
	{
		printf("%d\n", 1);
	}

	return 0;

}

Compiler output:
a.cc:4:6: error: expected unqualified-id before 'delete'
    4 | void delete(char *x)
      |      ^~~~~~
a.cc: In function 'int main()':
a.cc:21:16: warning: deleting array 'str'
   21 |         delete(str);
      |               ~^~~~
Language: C++

#pragma GCC optimize ("O3")
#pragma GCC target ("sse4")

#include <bits/stdc++.h>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/rope>

using namespace std;
using namespace __gnu_pbds;
using namespace __gnu_cxx;

const long long MOD = 998244353;
const long long ALTMOD = 100000007;

const int INF = 0x3F3F3F3F;
const long long INFLL = 0x3F3F3F3F3F3F3F3F;

vector<string> days = {"SAT", "FRI", "THU", "WED", "TUE", "MON", "SUN"};

int main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    string s; cin >> s;
    vector<string>::iterator it = find(days.begin(), days.end(), s);
    cout << it - days.begin() + 1 << "\n";
    return 0;
}

Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

#include<string>
#include <iostream>

using namespace std;

string days[] = { "MON","TUE","WED","THU","FRI","SAT" };

int main() {
	string s;
	cin >> s;
	if (s == "SUN") {
		cout << 7;
		return 0;
	}
	cout << 6 - (find(days, days + 6, s) - days);
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:26: error: no matching function for call to 'find(std::string [6], std::string*, std::string&)'
   15 |         cout << 6 - (find(days, days + 6, s) - days);
      |                      ~~~~^~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:15:26: note:   mismatched types 'std::istreambuf_iterator<_CharT>' and 'std::string*' {aka 'std::__cxx11::basic_string<char>*'}
   15 |         cout << 6 - (find(days, days + 6, s) - days);
      |                      ~~~~^~~~~~~~~~~~~~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ char s[3];
   cin>>s;
 enum days{SUN,MON,TUE,WED,THU,FRI,SAT};
 days day=s;
  cout<<7-day;
  
  
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:11: error: cannot convert 'char*' to 'main()::days' in initialization
    7 |  days day=s;
      |           ^
      |           |
      |           char*
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ char s[3];
   cin>>s;
 enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
 days day=s;
  cout<<7-day;
  
  
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected identifier before string constant
    6 |  enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |            ^~~~~
a.cc:6:12: error: expected '}' before string constant
    6 |  enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |           ~^~~~~
a.cc:6:12: error: expected unqualified-id before string constant
a.cc: At global scope:
a.cc:7:2: error: 'days' does not name a type
    7 |  days day=s;
      |  ^~~~
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout<<7-day;
      |   ^~~~
a.cc:11:3: error: expected unqualified-id before 'return'
   11 |   return 0;}
      |   ^~~~~~
a.cc:11:12: error: expected declaration before '}' token
   11 |   return 0;}
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{ char s[3];
   cin>>s;
 enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
 int g=s;
  cout<<7-g;
  
  
  return 0;}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:12: error: expected identifier before string constant
    6 |  enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |            ^~~~~
a.cc:6:12: error: expected '}' before string constant
    6 |  enum days{"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |           ~^~~~~
a.cc:6:12: error: expected unqualified-id before string constant
a.cc: At global scope:
a.cc:7:8: error: 's' was not declared in this scope
    7 |  int g=s;
      |        ^
a.cc:8:3: error: 'cout' does not name a type
    8 |   cout<<7-g;
      |   ^~~~
a.cc:11:3: error: expected unqualified-id before 'return'
   11 |   return 0;}
      |   ^~~~~~
a.cc:11:12: error: expected declaration before '}' token
   11 |   return 0;}
      |            ^
Language: C++

// Author:: MOHAMMAD FAISAL
// BEGINNING WITH THE NAME OF ALMIGHTY GOD ALLAH
#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;
  cin >> s;
  if(s=="MON")
    cout<<"6";
  else if(s=="TUE")
    cout<<"5";
  else if(s=="WED")
    cout<<"4";
  else if(s=="THU")
    cout<<"3";
  else if(s=="FRI")
    cout<<"2";
  else if(s=="SAT")
    cout<<"1";
  else
    cout<<"7";

Compiler output:
a.cc: In function 'int main()':
a.cc:22:15: error: expected '}' at end of input
   22 |     cout<<"7";
      |               ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: Java

import java.util.Scanner;

public class Q1{
	public static void main(String args[]){
        Scanner scanner = new Scanner(System.in);
        String w = "SUNMONTUEWEDTHUFRISAT";
        String s = scanner.next();
        int i = w.indexOf(s) / 3;
        System.out.println(7 - i);
    }
}


Compiler output:
Main.java:3: error: class Q1 is public, should be declared in a file named Q1.java
public class Q1{
       ^
1 error
Language: C

#include <stdio.h>
int main(void){
	char day[4];
	int i;
	scanf("%s",day);
	if(day[0]=='S'){
		if(day[1]=='U'){
			i=7;
		}else{
			i=1;
		}
	}else if(day[0]=='M'){
		i=6
	}else if(day[0]=='T'){
		if(day[1]=='U'){
			i=5;
		}else{
			i=3;
		}
	}else if(day[0]=='W'){
		i=4
	}else{
		i=2
	}
	printf("%d",i);
}

Compiler output:
main.c: In function 'main':
main.c:13:20: error: expected ';' before '}' token
   13 |                 i=6
      |                    ^
      |                    ;
   14 |         }else if(day[0]=='T'){
      |         ~           
main.c:21:20: error: expected ';' before '}' token
   21 |                 i=4
      |                    ^
      |                    ;
   22 |         }else{
      |         ~           
main.c:23:20: error: expected ';' before '}' token
   23 |                 i=2
      |                    ^
      |                    ;
   24 |         }
      |         ~
Language: C

#include <stdio.h>
int main(void){
	int num;
	char string[10001];
	scanf("%d%s",&num,&string);
	for(i=0;string[i]!='\0';i++){
		string[i]+=num;
		if(string[i]>'Z'){
			string[i]-'A';
		}
	}
	printf("%s",string);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=0;string[i]!='\0';i++){
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
Language: C

#include <stdio.h>
int main(void){
	int num;
	char string[10001];
	scanf("%d%s",&num,&string);
	for(i=0,string[i]!='\0',i++){
		string[i]+=num;
		if(string[i]>'Z'){
			string[i]-'A';
		}
	}
	printf("%s",string);
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:13: error: 'i' undeclared (first use in this function)
    6 |         for(i=0,string[i]!='\0',i++){
      |             ^
main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:36: error: expected ';' before ')' token
    6 |         for(i=0,string[i]!='\0',i++){
      |                                    ^
      |                                    ;
main.c:6:36: error: expected expression before ')' token
Language: C++

#include<bits/stdc++.h>
#define ll long long
using namespace std ;

int b = 0, c = 1e9 + 7 ;
vector<string>vc={"SUN","MON","TUE","WED","THU","FRI","SAT"};
int main ( ){
    string s ;
    cin >> s ;
    if(s=vc[6]){
        cout<<1;
    }
    if (s=vc[5]){
        cout<<2;
    }
    if ( s=vc[4]){
        cout<<3;
    }
    if(s=vc[3]){
        cout<<4;
    }
    if(s=vc[2]){
        cout<<5;
    }
    if(s=vc[1]){
        cout<<6;
    }
    if(s=vc[0]){
        cout<<7;
    }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](6))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |     if(s=vc[6]){
a.cc:13:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](5))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   13 |     if (s=vc[5]){
a.cc:16:11: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](4))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   16 |     if ( s=vc[4]){
a.cc:19:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](3))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   19 |     if(s=vc[3]){
a.cc:22:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](2))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   22 |     if(s=vc[2]){
a.cc:25:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](1))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   25 |     if(s=vc[1]){
a.cc:28:9: error: could not convert 's.std::__cxx11::basic_string<char>::operator=((*(const std::__cxx11::basic_string<char>*)(& vc.std::vector<std::__cxx11::basic_string<char> >::operator[](0))))' from 'std::__cxx11::basic_string<char>' to 'bool'
   28 |     if(s=vc[0]){
Language: C++

package main

import "fmt"

func main() {
	var (
		s string
	)
	week := [7]string{"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"}
	fmt.Scan(&s)
	res := 0
	for i := 0; i < 7; i++ {
		if week[i] == s {
			res = (7 - i) % 7
		}
	}
	fmt.Println(res)
}


Compiler output:
a.cc:1:1: error: 'package' does not name a type
    1 | package main
      | ^~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;

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


Compiler output:
a.cc:13:37: error: empty character constant
   13 |     else if(s=="SAT") cout<<1<<endl;''=
      |                                     ^~
a.cc: In function 'int main()':
a.cc:14:5: error: expected primary-expression before 'else'
   14 |     else if(s=="SUN") cout<<7<<endl;
      |     ^~~~
Language: C++

#include <iostream>

using namespace std;

int main()
{
    string C;
    CIN>>C;
    if(c="SUN")
        cout<<7;
        if(c="MUN")
        cout<<6;
        if(c="TUE")
        cout<<5;
        if(c="WED")
        cout<<4;
if(c="THU")
        cout<<3;
        if(c="FRI")
        cout<<2;
        if(c="SAT")
        cout<<1;
        
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:5: error: 'CIN' was not declared in this scope
    8 |     CIN>>C;
      |     ^~~
a.cc:9:8: error: 'c' was not declared in this scope
    9 |     if(c="SUN")
      |        ^
a.cc:11:12: error: 'c' was not declared in this scope
   11 |         if(c="MUN")
      |            ^
a.cc:13:12: error: 'c' was not declared in this scope
   13 |         if(c="TUE")
      |            ^
a.cc:15:12: error: 'c' was not declared in this scope
   15 |         if(c="WED")
      |            ^
a.cc:17:4: error: 'c' was not declared in this scope
   17 | if(c="THU")
      |    ^
a.cc:19:12: error: 'c' was not declared in this scope
   19 |         if(c="FRI")
      |            ^
a.cc:21:12: error: 'c' was not declared in this scope
   21 |         if(c="SAT")
      |            ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  char a[3];
  cin>>a;
  if(str(a,"MON")==0)
  {
    cout<<6;
  }
  else if(strcmp(a,"TUE")==0)
  {
    cout<<5;
  }
  else if(strcmp(a,"WED")==0)
  {
    cout<<4;
  }
  else if(strcmp(a,"THU")==0)
  {
    cout<<3;
  }
  else if(strcmp(a,"FRI")==0)
  {
    cout<<2;
  }
  else if(strcmp(a,"SAT")==0)
  {
    cout<<1;
  }
  else if(strcmp(a,"SUN")==0)
  {
    cout<<7;
  }
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:6: error: 'str' was not declared in this scope; did you mean 'std'?
    7 |   if(str(a,"MON")==0)
      |      ^~~
      |      std
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  char a[3];
  cin>>a;
  if(a=='MON')
  {
    cout<<6;
  }
  else if(a=='TUE')
  {
    cout<<5;
  }
  else if(a=='WED')
  {
    cout<<4;
  }
  else if(a=='THU')
  {
    cout<<3;
  }
  else if(a=='FRI')
  {
    cout<<2;
  }
  else if(a=='SAT')
  {
    cout<<1;
  }
  else if(a=='SUN')
  {
    cout<<7;
  }
  return 0;
}

Compiler output:
a.cc:7:9: warning: multi-character character constant [-Wmultichar]
    7 |   if(a=='MON')
      |         ^~~~~
a.cc:11:14: warning: multi-character character constant [-Wmultichar]
   11 |   else if(a=='TUE')
      |              ^~~~~
a.cc:15:14: warning: multi-character character constant [-Wmultichar]
   15 |   else if(a=='WED')
      |              ^~~~~
a.cc:19:14: warning: multi-character character constant [-Wmultichar]
   19 |   else if(a=='THU')
      |              ^~~~~
a.cc:23:14: warning: multi-character character constant [-Wmultichar]
   23 |   else if(a=='FRI')
      |              ^~~~~
a.cc:27:14: warning: multi-character character constant [-Wmultichar]
   27 |   else if(a=='SAT')
      |              ^~~~~
a.cc:31:14: warning: multi-character character constant [-Wmultichar]
   31 |   else if(a=='SUN')
      |              ^~~~~
a.cc: In function 'int main()':
a.cc:7:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if(a=='MON')
      |      ~^~~~~~~
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if(a=='TUE')
      |           ~^~~~~~~
a.cc:15:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   else if(a=='WED')
      |           ~^~~~~~~
a.cc:19:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   19 |   else if(a=='THU')
      |           ~^~~~~~~
a.cc:23:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   23 |   else if(a=='FRI')
      |           ~^~~~~~~
a.cc:27:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   27 |   else if(a=='SAT')
      |           ~^~~~~~~
a.cc:31:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   31 |   else if(a=='SUN')
      |           ~^~~~~~~
Language: Java

import javax.print.DocFlavor;
import java.awt.*;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        List<String> A = new ArrayList<>();
        A.add("SUN");
        A.add("MON");
        A.add("TUE");
        A.add("WED");
        A.add("THU");
        A.add("FRI");
        A.add("SAT");

        String S = next();

        for(int i=0; i<7; i++){
            if(A.get(i).equals(S)){
                println(7-i);
                return;
            }
        }
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }


Compiler output:
Main.java:60: error: reached end of file while parsing
    }
     ^
1 error
Language: C++

import javax.print.DocFlavor;
import java.awt.*;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
import java.util.List;

public class Main {

    static String br = System.getProperty("line.separator");
    static Scanner sc = new Scanner(System.in);
    static PrintWriter out = new PrintWriter(System.out);

    public static void main(String[] args) {
        List<String> A = new ArrayList<>();
        A.add("SUN");
        A.add("MON");
        A.add("TUE");
        A.add("WED");
        A.add("THU");
        A.add("FRI");
        A.add("SAT");

        String S = next();

        for(int i=0; i<7; i++){
            if(A.get(i).equals(S)){
                println(7-i);
                return;
            }
        }
    }

    static int nextInt() {
        return Integer.parseInt(next());
    }

    static Long nextLong() {
        return Long.parseLong(next());
    }

    static String next() {
        return sc.next();
    }

    static String nextLine(){
        return sc.nextLine();
    }

    static void println(Object o) {
        out.println(o);
        out.flush();
    }

    static void print(Object o) {
        PrintWriter out = new PrintWriter(System.out);
        out.print(o);
        out.flush();
    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import javax.print.DocFlavor;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.awt.*;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.io.PrintWriter;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.lang.reflect.Array;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.math.BigInteger;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.*;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.List;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: expected unqualified-id before 'public'
    9 | public class Main {
      | ^~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
	string s;
	cin>>s;
	string a[7]={"SUN","MON","TUE","WED","THU","FRI","SAT"};
	int i,j;
	if(s=a[0])
	cout<<7;
	for(i=1;i<4;i++)
	{
		if(s==a[i])
		cout<<i;
	
    }
    for(j=6;j>3;j--)
    {
    	if(s==a[j])
		cout<<j;
	}
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(a[0])' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |         if(s=a[0])
      |            ~^~~~~
      |             |
      |             std::__cxx11::basic_string<char>
Language: C++

#include <iostream>
using namespace std;

int main(void){
  char = s;
  int = ans;
  cin >> s;
  if(s==SUN){
    ans = 7;
  }else if(s==MON){
    ans = 6;
  }else if(s==TUE){
    ans = 5;
  }else if(s==WED){ 
    ans = 4; 
  }else if(s==THU){
    ans = 3;
  }else if(s==FRI){
    and = 2;
  }else if(s==SAT){
    ans = 1;
  }
  cout << ans;
}
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before '=' token
    5 |   char = s;
      |        ^
a.cc:6:7: error: expected unqualified-id before '=' token
    6 |   int = ans;
      |       ^
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:9: error: 'SUN' was not declared in this scope
    8 |   if(s==SUN){
      |         ^~~
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans = 7;
      |     ^~~
      |     abs
a.cc:10:15: error: 'MON' was not declared in this scope
   10 |   }else if(s==MON){
      |               ^~~
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans = 6;
      |     ^~~
      |     abs
a.cc:12:15: error: 'TUE' was not declared in this scope
   12 |   }else if(s==TUE){
      |               ^~~
a.cc:13:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     ans = 5;
      |     ^~~
      |     abs
a.cc:14:15: error: 'WED' was not declared in this scope
   14 |   }else if(s==WED){
      |               ^~~
a.cc:15:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |     ans = 4;
      |     ^~~
      |     abs
a.cc:16:15: error: 'THU' was not declared in this scope
   16 |   }else if(s==THU){
      |               ^~~
a.cc:17:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     ans = 3;
      |     ^~~
      |     abs
a.cc:18:15: error: 'FRI' was not declared in this scope
   18 |   }else if(s==FRI){
      |               ^~~
a.cc:19:9: error: expected identifier before '=' token
   19 |     and = 2;
      |         ^
a.cc:20:15: error: 'SAT' was not declared in this scope
   20 |   }else if(s==SAT){
      |               ^~~
a.cc:21:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |     ans = 1;
      |     ^~~
      |     abs
a.cc:23:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   cout << ans;
      |           ^~~
      |           abs
Language: C++

#include <iostream>
using namespace std;

int main(void){
  char = s;
  int = ans;
  cin >> s;
  if(s==SUN){
    ans = 7;
  }else if(s==MON){
    ans = 6;
  }else if(s==TUE){
    ans = 5;
  }else if(s==WED){ 
    ans = 4; 
  }else if(s==THU){
    ans = 3;
  }else if(s==FRI){
    and = 2;
  }else if(s==SAT){
    ans = 1;
  }
  cout << ans;
    
  
  


Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected unqualified-id before '=' token
    5 |   char = s;
      |        ^
a.cc:6:7: error: expected unqualified-id before '=' token
    6 |   int = ans;
      |       ^
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:9: error: 'SUN' was not declared in this scope
    8 |   if(s==SUN){
      |         ^~~
a.cc:9:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |     ans = 7;
      |     ^~~
      |     abs
a.cc:10:15: error: 'MON' was not declared in this scope
   10 |   }else if(s==MON){
      |               ^~~
a.cc:11:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |     ans = 6;
      |     ^~~
      |     abs
a.cc:12:15: error: 'TUE' was not declared in this scope
   12 |   }else if(s==TUE){
      |               ^~~
a.cc:13:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |     ans = 5;
      |     ^~~
      |     abs
a.cc:14:15: error: 'WED' was not declared in this scope
   14 |   }else if(s==WED){
      |               ^~~
a.cc:15:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   15 |     ans = 4;
      |     ^~~
      |     abs
a.cc:16:15: error: 'THU' was not declared in this scope
   16 |   }else if(s==THU){
      |               ^~~
a.cc:17:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   17 |     ans = 3;
      |     ^~~
      |     abs
a.cc:18:15: error: 'FRI' was not declared in this scope
   18 |   }else if(s==FRI){
      |               ^~~
a.cc:19:9: error: expected identifier before '=' token
   19 |     and = 2;
      |         ^
a.cc:20:15: error: 'SAT' was not declared in this scope
   20 |   }else if(s==SAT){
      |               ^~~
a.cc:21:5: error: 'ans' was not declared in this scope; did you mean 'abs'?
   21 |     ans = 1;
      |     ^~~
      |     abs
a.cc:23:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   23 |   cout << ans;
      |           ^~~
      |           abs
a.cc:23:15: error: expected '}' at end of input
   23 |   cout << ans;
      |               ^
a.cc:4:15: note: to match this '{'
    4 | int main(void){
      |               ^
Language: C++

#include <iostream>

// enum型の定義
enum week {
  SAT,
  FRI,
  THU,
  WED,
  TUE,
  MON,
  SUN
}

int main(){
    std::string str;
    std::cin >> str;

    std::cout << str << std::endl;

    return 0;
}

Compiler output:
a.cc:4:1: error: new types may not be defined in a return type
    4 | enum week {
      | ^~~~
a.cc:4:1: note: (perhaps a semicolon is missing after the definition of 'week')
a.cc:4:1: error: two or more data types in declaration of 'main'
Language: C++

#include <iostream>

int main(){
    std::string str;
    std::cin >> str;

    int ans;

    switch(str){
        case "SUN":
            ans = 7;
            break;
        case "MON":
            ans = 6;
            break;
        case "TUE":
            ans = 5;
            break;
        case "WED":
            ans = 4;
            break;
        case "THU":
            ans = 3;
            break;
        case "FRI":
            ans = 2;
            break;
        case "SAT":
            ans = 1;
            break;
    }

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:12: error: switch quantity not an integer
    9 |     switch(str){
      |            ^~~
Language: C++

#include <iostream>

int main(){
    std::string str;
    std::cin >> str;

    int ans;

    switch(std){
        case "SUN":
            ans = 7;
            break;
        case "MON":
            ans = 6;
            break;
        case "TUE":
            ans = 5;
            break;
        case "WED":
            ans = 4;
            break;
        case "THU":
            ans = 3;
            break;
        case "FRI":
            ans = 2;
            break;
        case "SAT":
            ans = 1;
            break;
    }

    std::cout << ans << std::endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before ')' token
    9 |     switch(std){
      |               ^