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

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;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:2:3: error: 'string' was not declared in this scope
    2 |   string S;
      |   ^~~~~~
a.cc:3:3: error: 'cin' was not declared in this scope
    3 |   cin >> S;
      |   ^~~
a.cc:3:10: error: 'S' was not declared in this scope
    3 |   cin >> S;
      |          ^
a.cc:5:16: error: 'cout' was not declared in this scope
    5 |   if(S=="SUN") cout << 7 << endl;
      |                ^~~~
a.cc:5:29: error: 'endl' was not declared in this scope
    5 |   if(S=="SUN") cout << 7 << endl;
      |                             ^~~~
a.cc:6:16: error: 'cout' was not declared in this scope
    6 |   if(S=="MON") cout << 6 << endl;
      |                ^~~~
a.cc:6:29: error: 'endl' was not declared in this scope
    6 |   if(S=="MON") cout << 6 << endl;
      |                             ^~~~
a.cc:7:16: error: 'cout' was not declared in this scope
    7 |   if(S=="TUE") cout << 5 << endl;
      |                ^~~~
a.cc:7:29: error: 'endl' was not declared in this scope
    7 |   if(S=="TUE") cout << 5 << endl;
      |                             ^~~~
a.cc:8:16: error: 'cout' was not declared in this scope
    8 |   if(S=="WED") cout << 4 << endl;
      |                ^~~~
a.cc:8:29: error: 'endl' was not declared in this scope
    8 |   if(S=="WED") cout << 4 << endl;
      |                             ^~~~
a.cc:9:16: error: 'cout' was not declared in this scope
    9 |   if(S=="THU") cout << 3 << endl;
      |                ^~~~
a.cc:9:29: error: 'endl' was not declared in this scope
    9 |   if(S=="THU") cout << 3 << endl;
      |                             ^~~~
a.cc:10:16: error: 'cout' was not declared in this scope
   10 |   if(S=="FRI") cout << 2 << endl;
      |                ^~~~
a.cc:10:29: error: 'endl' was not declared in this scope
   10 |   if(S=="FRI") cout << 2 << endl;
      |                             ^~~~
a.cc:11:16: error: 'cout' was not declared in this scope
   11 |   if(S=="SAT") cout << 1 << endl;
      |                ^~~~
a.cc:11:29: error: 'endl' was not declared in this scope
   11 |   if(S=="SAT") cout << 1 << endl;
      |                             ^~~~
Language: C++

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

int main() {
    string S;
    cin >> string;
    
    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: In function 'int main()':
a.cc:6:18: error: expected primary-expression before ';' token
    6 |     cin >> string;
      |                  ^
Language: C++

#include<iostream>
#include<string>
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:8:10: error: switch quantity not an integer
    8 |   switch(S){
      |          ^
Language: C++

#include<iostream>
#include<string>
using namespace std;

int main(){
  string S;
  int N;
  cin>>N>>S;
  for(int i=0;i<S.size();i++){
    T=S[i]-'A';
    S[i]+=(T+N)%26
    cout<<S[i];
  }
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'T' was not declared in this scope
   10 |     T=S[i]-'A';
      |     ^
Language: C++

#include<bits/stdc++.h>
//#pragma GCC optimize("Ofast","no-stack-protector","unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx")
//#include<bits/extc++.h>
//using namespace __gnu_pbds;
using namespace std;
#define F(i,L,R) for(int i=L;i<R;++i)
#define FE(i,L,R) for(int i=L;i<=R;++i)
#define getI(a) scanf("%d", &a)
#define getII(a,b) scanf("%d%d", &a, &b)
#define getIII(a,b,c) scanf("%d%d%d", &a, &b, &c)
#define VgetI(n) int (n); scanf("%d",&(n))
#define VgetII(n,m) int (n),(m); scanf("%d %d",&(n),&(m))
#define VgetIII(n,m,k) int (n),(m),(k); scanf("%d %d %d",&(n),&(m),&(k))
#define debug(x) cout<<(#x)<<"="<<x<<"\n";
#define qq cout<<"QQ\n";
#define pb emplace_back
#define pii pair<int,int>
#define mp make_pair
#define f first
#define s second
#define ll long long
#define INF 2000000000
string a,b;
int main(){
        int n,m;
        while(cin>>a){
                int ans;
                if(a=="SUN") ans=7;
                if(a=="MOD") ans=6;
                if(a=="TUE") ans=5;
                if(a=="WED") ans=4;
                if(a=="THU") ans=3;
                if(a=="FRI") ans=2;
                if(a=="SAT") ans=1;
                cout<<ans<<"\n"
        }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:36:32: error: expected ';' before '}' token
   36 |                 cout<<ans<<"\n"
      |                                ^
      |                                ;
   37 |         }
      |         ~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:15:4: error: 'a' was not declared in this scope
   15 |   }a
      |    ^
a.cc:19:5: error: 'else' without a previous 'if'
   19 |     else if (s=="THU"){
      |     ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
  string S;
  cin >> S;
  
  SUN = 0;
  MON = 1;
  TUE = 2;
  WED = 3;
  THU = 4;
  FRI = 5;
  SAT = 6;
  
  cout << S;
  
    return 0;
}

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

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

int main(){
  string S;
  cin >> S;
  vector<string> W(7) ={"SUN","MON","TUE","WED","THU","FRI","SAT"};
  int t = 0;
  for(int i=0;i<7;i++){
    if(S == W.at(i)){
      t= i;
    }
  }
  cout <<7-c <<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:23: error: expected ',' or ';' before '=' token
    7 |   vector<string> W(7) ={"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |                       ^
a.cc:14:12: error: 'c' was not declared in this scope
   14 |   cout <<7-c <<endl;
      |            ^
Language: C++

#include<iostream>
main(){
string c; std::cin>>c;
string a[7]={"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
for(int i=0;i<7;i++){if(c==a[i])std::cout<<7-i;}


}







Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
    3 | string c; std::cin>>c;
      | ^~~~~~
a.cc:3:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:3:21: error: 'c' was not declared in this scope
    3 | string c; std::cin>>c;
      |                     ^
a.cc:4:7: error: expected ';' before 'a'
    4 | string a[7]={"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
      |       ^~
      |       ;
a.cc:5:28: error: 'a' was not declared in this scope
    5 | for(int i=0;i<7;i++){if(c==a[i])std::cout<<7-i;}
      |                            ^
Language: C++

#include<iostream>
main(){
string c; cin>>c;
string a[7]={"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
for(int i=0;i<7;i++){if(c==a[i])cout<<7-i;}


}







Compiler output:
a.cc:2:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    2 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:3:1: error: 'string' was not declared in this scope
    3 | string c; cin>>c;
      | ^~~~~~
a.cc:3:1: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:3:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    3 | string c; cin>>c;
      |           ^~~
      |           std::cin
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:3:16: error: 'c' was not declared in this scope
    3 | string c; cin>>c;
      |                ^
a.cc:4:7: error: expected ';' before 'a'
    4 | string a[7]={"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
      |       ^~
      |       ;
a.cc:5:28: error: 'a' was not declared in this scope
    5 | for(int i=0;i<7;i++){if(c==a[i])cout<<7-i;}
      |                            ^
a.cc:5:33: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    5 | for(int i=0;i<7;i++){if(c==a[i])cout<<7-i;}
      |                                 ^~~~
      |                                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc:1:10: fatal error: bit/stdc++.h: No such file or directory
    1 | #include <bit/stdc++.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.
Language: C++

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

int f(char *s) {
	int n = 0;
	for(int i = 0; i < strlen(s) - 2; i++) {
		if(s[i] == 'A' && s[i+1] == 'B' && s[i+2] == 'C')
			n++;
	}
	return n;
}

int main() {
	int n;
	scanf("%d", &n);
	scanf(" ");
	char s[n + 1];
	gets(s);
	printf("%d\n", f(s));
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:9: error: 'gets' was not declared in this scope; did you mean 'getw'?
   18 |         gets(s);
      |         ^~~~
      |         getw
Language: C++

#include <stdio.h>
#include <string.h>
const char *strings[] = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};

int main()
{
 char s[10];
 gets(s);
 int i;
 for(i = 0;; i++)
 {
  if(!strcmp(s, strings[i]))
   break;
 }
 printf("%d\n", 7 - i);
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:2: error: 'gets' was not declared in this scope; did you mean 'getw'?
    8 |  gets(s);
      |  ^~~~
      |  getw
Language: C++

#define ANSWER
#include <algorithm>
#include <vector>
#include <iostream>


template <typename T> 
class mylist {
    public:
        std::vector<T> list;
        void sort(); 
        std::vector<T> sorted();
        std::vector<int> argsort();
        int find(T key){
            typename std::vector<T>::iterator iter = std::find(list.begin(), list.end(), key);
            return std::distance(list.begin(), iter);
        };
};#include <iostream>
#include <vector>
#include <cstdarg>

class mystd
{
public:
    template<typename T>
    static bool Input(int number,...);
    static bool InputArray(std::vector<long long> array);
    static bool InputArrays(long long number,...);
    static bool InputMatrix(std::vector<std::vector<long long>> array);
    static long long min(std::vector<long long> array);
    static long long max(std::vector<long long> array);
    template<typename T>
    static void Print(int number,...);
};

template<typename T>
bool mystd::Input(int number,...){
    va_list args;
    va_start(args, number);
    for (long long i = 0; i < number; i++)
    {
        std::cin >> *(va_arg(args, T*));
    }
    return true;
}

template<typename T>
void mystd::Print(int number,...){
    va_list args;
    va_start(args, number);
    for (long long i = 0; i < number; i++)
    {
        if(i!=0){
            std::cout << " ";
        }
        std::cout << *(va_arg(args, T*));
    }
    std::cout << std::endl;;
}

bool mystd::InputArray(std::vector<long long> array){
    for (long long &i : array)
    {
        std::cin >> i;
    }
    return true;
}

bool mystd::InputArrays(long long number,...){
    va_list args;
    va_start(args, number);
    std::vector<std::vector<long long>*> arrays(number);
    for (auto &i : arrays)
    {
        i = va_arg(args, std::vector<long long>*);
    }
    long long length = arrays[0]->size();

    for (long long j=0;j<length;j++)
    {
        for (auto &&i : arrays)
        {
            std::cin >> (*i)[j];
        }
    }
    return true;
}


long long mystd::min(std::vector<long long> array){
    long long ans = array[0];
    for (long long &i : array)
    {
        if(i < ans){
            ans = i;
        }
    }
    return ans;
}


long long mystd::max(std::vector<long long> array){
    long long ans = array[0];
    for (long long &i : array)
    {
        if(i > ans){
            ans = i;
        }
    }
    return ans;
}

#ifndef ANSWER
#include "../../library/mystd.hpp"
#include "../../library/mylist.hpp"
#endif

#include <algorithm>
typedef long long ll;

void Main(){
    ll N;
    mylist<std::string> weekdays;
    weekdays.list = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
    std::string input;
    mystd::Input<std::string>(1,&input);
    int answer = weekdays.list.size() - weekdays.find(input);
    
    mystd::Print<int>(1,&answer);
}

int main(int argc, char const *argv[])
{
    Main();
    return 0;
}

Compiler output:
a.cc:18:3: error: stray '#' in program
   18 | };#include <iostream>
      |   ^
a.cc:18:4: error: 'include' does not name a type
   18 | };#include <iostream>
      |    ^~~~~~~
Language: Java

 import java.util.*;
  
 public class Main {
 	public static void main(String[] args) {
 		// practice contest
  
 		Scanner sc = new Scanner(System.in);
 		String s = sc.next();

		String[] d = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
		int i;

		for (i = 0; i < d.length; i++) {
			if (s.equal(d[i])) {
				System.out.println(7 - i);
 			}
 		}
 	}
}


Compiler output:
Main.java:14: error: cannot find symbol
			if (s.equal(d[i])) {
			     ^
  symbol:   method equal(String)
  location: variable s of type String
1 error
Language: C++

#include <iostream>
using namespace std;

int main(){
  char S;
  cin >> S;
  if (S == "SUN") {
      cout << "7" << endl;
  } else 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 {
      cout << "1" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |   if (S == "SUN") {
      |       ~~^~~~~~~~
a.cc:9:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   } else if (S == "MON") {
      |              ~~^~~~~~~~
a.cc:11:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   }else if (S == "TUE") {
      |             ~~^~~~~~~~
a.cc:13:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   }else if (S == "WED") {
      |             ~~^~~~~~~~
a.cc:15:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   }else if (S == "THU") {
      |             ~~^~~~~~~~
a.cc:17:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   }else if (S == "FRI") {
      |             ~~^~~~~~~~
Language: C++

 import java.util.*;
  
 public class Main {
 	public static void main(String[] args) {
 		// practice contest
  
 		Scanner sc = new Scanner(System.in);
 		String s = sc.next();

		String[] d = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
		int i;

		for (i = 0; i < d.length; i++) {
			if (s == d[i]) {
				System.out.println(7 - i);
 			}
 		}
 	}
}

Compiler output:
a.cc:2:2: error: extended character   is not valid in an identifier
    2 |   
      |  ^
a.cc:1:2: error: 'import' does not name a type
    1 |  import java.util.*;
      |  ^~~~~~
a.cc:1:2: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:2: error: '\U000000a0' does not name a type
    2 |   
      |  ^
Language: Java

import java.util.*;

public class Main {
	public static void main(String[] args) {
		// practice contest

		Scanner sc = new Scanner(System.in);
		String s = sc.nextLine();

		String[] d = { "SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT" };
		int i;

		for (i = 0; i < d.length; i++) {
			if (s == d[i]) {
				System.out.println(7 - i);
			}else{
              return;
		}
	}
}

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

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

int main() {
  string S;
  cin >> S;
  vector<string> date = {"MON","TUE","WED","THU","FRI","SAT","SUN"}
  
  for (int i = 0; i < 7; i++) {
    if (S == date.at(i)) {
      cout << i+1 <<endl;
      break;
    }
  }
  
}


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

s=input()
if s == 'SAT':
    print(1)
if s == 'SUN':
    print(7)
if s == 'MON':
    print(6)
if s == 'TUE':
    print(5)
if s == 'WED':
    print(4)
if s == 'THU':
    print(3)
if s == 'FRI':
    print(2)

Compiler output:
a.cc:2:9: warning: multi-character character constant [-Wmultichar]
    2 | if s == 'SAT':
      |         ^~~~~
a.cc:4:9: warning: multi-character character constant [-Wmultichar]
    4 | if s == 'SUN':
      |         ^~~~~
a.cc:6:9: warning: multi-character character constant [-Wmultichar]
    6 | if s == 'MON':
      |         ^~~~~
a.cc:8:9: warning: multi-character character constant [-Wmultichar]
    8 | if s == 'TUE':
      |         ^~~~~
a.cc:10:9: warning: multi-character character constant [-Wmultichar]
   10 | if s == 'WED':
      |         ^~~~~
a.cc:12:9: warning: multi-character character constant [-Wmultichar]
   12 | if s == 'THU':
      |         ^~~~~
a.cc:14:9: warning: multi-character character constant [-Wmultichar]
   14 | if s == 'FRI':
      |         ^~~~~
a.cc:1:1: error: 's' does not name a type
    1 | s=input()
      | ^
Language: C++

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

int main(){
  vector<string> d={"SUN","MON","TUE","WED","THU","FRI","SAT"}
  string t;
  cin>>t;
  for(int i=0; i<7; i++){
    if(t == d[i]){
      cout << 7-i << endl;
      return 0;
    }
  }
}

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

#include <iostream>
#include <string>
using namespace std;
 
int main(void){
  string str;
  cin >> str;
  char X[7][4] = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
  int count = 0;
  for(count = 0;count < 7;count++){
    if(strcmp(str,X[i])){
      continue;
    }
  }
  cout << count << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: 'i' was not declared in this scope
   11 |     if(strcmp(str,X[i])){
      |                     ^
a.cc:11:8: error: 'strcmp' was not declared in this scope
   11 |     if(strcmp(str,X[i])){
      |        ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

#include <iostream>
using namespace std;

int main(void){
  string str;
  cin >> str;
  char[7][4] X = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
  int count = 0;
  for(count = 0;count < 7;count++){
    if(strcmp(str,X[i])){
      continue;
    }
  }
  cout << count << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:8: error: expected identifier before numeric constant
    7 |   char[7][4] X = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |        ^
a.cc:7:8: error: expected ']' before numeric constant
    7 |   char[7][4] X = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |        ^
      |        ]
a.cc:7:7: error: structured binding declaration cannot have type 'char'
    7 |   char[7][4] X = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |       ^
a.cc:7:7: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:7: error: empty structured binding declaration
a.cc:7:10: error: expected initializer before '[' token
    7 |   char[7][4] X = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
      |          ^
a.cc:10:19: error: 'X' was not declared in this scope
   10 |     if(strcmp(str,X[i])){
      |                   ^
a.cc:10:21: error: 'i' was not declared in this scope
   10 |     if(strcmp(str,X[i])){
      |                     ^
a.cc:10:8: error: 'strcmp' was not declared in this scope
   10 |     if(strcmp(str,X[i])){
      |        ^~~~~~
a.cc:2:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | using namespace std;
Language: C++

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

int main() {
  SUN,MON,TUE,WED,THU,FRI,SAT
  string S;
  cin >> S;
  int ans;
  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"){
    ans = 2;
  }else if(S == "SAT"){
    ans = 1;
  }
  cout << ans << endl;
}   

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'SUN' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |   ^~~
a.cc:5:7: error: 'MON' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |       ^~~
a.cc:5:11: error: 'TUE' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |           ^~~
a.cc:5:15: error: 'WED' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |               ^~~
a.cc:5:19: error: 'THU' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |                   ^~~
a.cc:5:23: error: 'FRI' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |                       ^~~
a.cc:5:27: error: 'SAT' was not declared in this scope
    5 |   SUN,MON,TUE,WED,THU,FRI,SAT
      |                           ^~~
a.cc:7:10: error: 'S' was not declared in this scope
    7 |   cin >> S;
      |          ^
Language: Java

#include <iostream>
#include<string.h>
using namespace std;

int main()
{
string S;
cin>>S;
 if (S.compare("SUN")==0){
     cout<<7;}
 else if(S.compare("MON")==0){

     cout<<6;}
 else if(S.compare("TUE")==0){
     cout<<5;}
else if(S.compare("WED")==0){
     cout<<4;}
 else if(S.compare("THU")==0){
     cout<<3;}
 else if(S.compare("FRI")==0){
     cout<<2;}
 else if(S.compare("SAT")==0){
     cout<<1;
    }

    return 0;
}


Compiler output:
Main.java:1: error: illegal character: '#'
#include <iostream>
^
Main.java:2: error: illegal character: '#'
#include<string.h>
^
Main.java:8: error: not a statement
cin>>S;
   ^
Main.java:10: error: not a statement
     cout<<7;}
         ^
Main.java:13: error: not a statement
     cout<<6;}
         ^
Main.java:15: error: not a statement
     cout<<5;}
         ^
Main.java:17: error: not a statement
     cout<<4;}
         ^
Main.java:19: error: not a statement
     cout<<3;}
         ^
Main.java:21: error: not a statement
     cout<<2;}
         ^
Main.java:23: error: not a statement
     cout<<1;
         ^
Main.java:5: error: unnamed classes are a preview feature and are disabled by default.
int main()
^
  (use --enable-preview to enable unnamed classes)
11 errors
Language: C++

#include <iostream>
#include <string>

int main(){
  std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
  std::string s;
  std::cin >> s;
  for(int i=0; i<7; ++i)
    if(w[i] == s[i])
      std::cout << i << std::endl;
  return 0;
}

Compiler output:
a.cc:5:17: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                 ^~~~~
a.cc:5:23: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                       ^~~~~
a.cc:5:29: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                             ^~~~~
a.cc:5:35: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                   ^~~~~
a.cc:5:41: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                         ^~~~~
a.cc:5:47: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                               ^~~~~
a.cc:5:53: warning: multi-character character constant [-Wmultichar]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                     ^~~~~
a.cc: In function 'int main()':
a.cc:5:58: error: narrowing conversion of '5461326' from 'int' to 'char' [-Wnarrowing]
    5 |   std::string w{'SUN','MON','TUE','WED','THU','FRI','SAT'};
      |                                                          ^
Language: C++

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

int main() {
    int S;

    cin >> S; 

    if(s == "SUN"){
        cout << "0";
    }
    if(s == "SAT"){
        cout << "1";
    }
    if(s == "FRI"){
        cout << "2";
    }
    if(s == "THU"){
        cout << "3";
    }
    if(s == "WED"){
        cout << "4";
    }
    if(s == "TUE"){
        cout << "5";
    }else{
        cout << "6"
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:8: error: 's' was not declared in this scope
    9 |     if(s == "SUN"){
      |        ^
a.cc:12:8: error: 's' was not declared in this scope
   12 |     if(s == "SAT"){
      |        ^
a.cc:15:8: error: 's' was not declared in this scope
   15 |     if(s == "FRI"){
      |        ^
a.cc:18:8: error: 's' was not declared in this scope
   18 |     if(s == "THU"){
      |        ^
a.cc:21:8: error: 's' was not declared in this scope
   21 |     if(s == "WED"){
      |        ^
a.cc:24:8: error: 's' was not declared in this scope
   24 |     if(s == "TUE"){
      |        ^
a.cc:27:20: error: expected ';' before '}' token
   27 |         cout << "6"
      |                    ^
      |                    ;
   28 |     }
      |     ~
Language: C

int main()
{
    char s[];
    scanf("%c",s);
   switch(s){
   case "SUN":
         printf("7");
   case "MON":
         printf("6");
   case "TUE":
         printf("5");
   case  "WED":
         printf("4");
   case "THU":
         printf("3");
   case "FRI":
         printf("2");
   case "SAT":
         printf("1");
   }
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:10: error: array size missing in 's'
    3 |     char s[];
      |          ^
main.c:4:5: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |     scanf("%c",s);
      |     ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main()
main.c:4:5: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |     scanf("%c",s);
      |     ^~~~~
main.c:4:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:11: error: switch quantity not an integer
    5 |    switch(s){
      |           ^
main.c:6:4: error: pointers are not permitted as case values
    6 |    case "SUN":
      |    ^~~~
main.c:7:10: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    7 |          printf("7");
      |          ^~~~~~
main.c:7:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:7:10: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:7:10: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:4: error: pointers are not permitted as case values
    8 |    case "MON":
      |    ^~~~
main.c:10:4: error: pointers are not permitted as case values
   10 |    case "TUE":
      |    ^~~~
main.c:12:4: error: pointers are not permitted as case values
   12 |    case  "WED":
      |    ^~~~
main.c:14:4: error: pointers are not permitted as case values
   14 |    case "THU":
      |    ^~~~
main.c:16:4: error: pointers are not permitted as case values
   16 |    case "FRI":
      |    ^~~~
main.c:18:4: error: pointers are not permitted as case values
   18 |    case "SAT":
      |    ^~~~
Language: Java

import java.util.Scanner;

public class ProblemA {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] week = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
        String input = s.nextLine();
        if(input.equals(week[0])) {
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        else if (input.equals(week[6])) {
            System.out.println("It is Saturday today, and tomorrow will be Sunday");
        }
        else {
            int i=0;
            while (!input.equals(week[i])) {
                i++;
            }
            System.out.println((7-i) + "day(s) later");
        }
    }
}


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

#include <stdio.h>
#include <stdlib.h>

int main()
{
    char s;
    printf("please enter you day ");
    scanf(" %c
          ",&s);
    if(s=="SAT")
    {
        printf("the number of this day is 1");
        printf("it is saturday today and tomorrow will be sunday");
    }
    else if (s=="SUN")
    {
        printf("the number of this day is 2");
        printf("it is sunday today and tomorrow will be monday");
    }
    else if (s=="MON")
    {
        printf("the number of this day is 3");
        printf("it is monday today and tomorrow will be  tuesday");
    }
    else if (s=="TUE")
    {
        printf("the number of this day is 4");
        printf("it is tuesday today and tomorrow will be  wedday");
    }
    else if (s=="WED")
    {
        printf("the number of this day is 5");
        printf("it is wedensday today and tomorrow will be  thurathday");
    }
    else if (s=="THU")
    {
        printf("the number of this day is 6");
        printf("it is tuesday today and tomorrow will be  firday");
    }
    else if (s=="FRI")
    {
        printf("the number of this day is 7");
        printf("it is friday today and tomorrow will be  sunday");
    }





}





Compiler output:
main.c: In function 'main':
main.c:8:11: warning: missing terminating " character
    8 |     scanf(" %c
      |           ^
main.c:8:11: error: missing terminating " character
    8 |     scanf(" %c
      |           ^~~~
main.c:9:11: warning: missing terminating " character
    9 |           ",&s);
      |           ^
main.c:9:11: error: missing terminating " character
    9 |           ",&s);
      |           ^~~~~~
main.c:10:5: error: expected expression before 'if'
   10 |     if(s=="SAT")
      |     ^~
main.c:44:6: error: expected ';' before '}' token
   44 |     }
      |      ^
      |      ;
......
   50 | }
      | ~
Language: Java

 public void getDay(String S){
      
       // Scanner sc = new Scanner(System.in);
        //S = sc.nextLine();
        if (S.toUpperCase().equals("SUN")){
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again");
        }
        else if (S.equals("MON")){
                        System.out.println("It is Monday today, and six days later, it will be Sunday again");

        }
        else if (S.equals("TUE")){
                        System.out.println("It is Tuesday today, and five days later, it will be Sunday again");

        }
        else if (S.equals("WED")){
                        System.out.println("It is Wednesday today, and four days later, it will be Sunday again");

        }
        else if (S.equals("THU")){
                        System.out.println("It is Thursday today, and three days later, it will be Sunday again");

        }
else if (S.equals("FRI")){
                        System.out.println("It is Friday today, and two days later, it will be Sunday again");

        }        
        else if (S.equals("SAT")){
                        System.out.println("It is Saturday today, and one days later, it will be Sunday again");

        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public void getDay(String S){
        ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java


    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] week = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
        String input = s.nextLine();
        if(input.equals(week[0])) {
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        else if (input.equals(week[6])) {
            System.out.println("It is Saturday today, and tomorrow will be Sunday");
        }
        else {
            int i=0;
            while (!input.equals(week[i])) {
                i++;
            }
            System.out.println((7-i) + "day(s) later");
        }
    }


Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
         Scanner r = new Scanner(System.in);
         String day = r.next();
         if (day == "Sunday") {
             System.out.println("7");
            // System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
         }
         else if (day == "Monday"){
             System.out.println("6");


         }
         else if (day=="Tuesday"){
             System.out.println("5");
         }
         else if (day == "Wednesday"){
             System.out.println("4");
         }
         else if (day == "Thursday"){
             System.out.println("3");}
         else if (day == "Friday"){
             System.out.println("2");}
         else if (day == "Saturday"){
             System.out.println("1");
         }
       }
      // System.out.println(x);


Compiler output:
Main.java:30: error: reached end of file while parsing
       }
        ^
1 error
Language: Java

import java.util.Scanner;

public class A {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        String[] week = {"SUN","MON","TUE","WED","THU","FRI","SAT"};
        String input = s.nextLine();
        if(input.equals(week[0])) {
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
        }
        else if (input.equals(week[6])) {
            System.out.println("It is Saturday today, and tomorrow will be Sunday");
        }
        else {
            int i=0;
            while (!input.equals(week[i])) {
                i++;
            }
            System.out.println((7-i) + "day(s) later");
        }
    }
}

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

public void getDay(String S){
        // TODO code application logic here
      
        
      
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        if (S.toUpperCase().equals("SUN")){
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again");
        }
        else if (S.equals("MON")){
                        System.out.println("It is Monday today, and six days later, it will be Sunday again");

        }
        else if (S.equals("TUE")){
                        System.out.println("It is Tuesday today, and five days later, it will be Sunday again");

        }
        else if (S.equals("WED")){
                        System.out.println("It is Wednesday today, and four days later, it will be Sunday again");

        }
        else if (S.equals("THU")){
                        System.out.println("It is Thursday today, and three days later, it will be Sunday again");

        }
else if (S.equals("FRI")){
                        System.out.println("It is Friday today, and two days later, it will be Sunday again");

        }        
        else if (S.equals("SAT")){
                        System.out.println("It is Saturday today, and one days later, it will be Sunday again");

        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
public void getDay(String S){
       ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

 public static void main(String[] args) {
        // TODO code application logic here
        String S;
        
      
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        if (S.toUpperCase().equals("SUN")){
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again");
        }
        else if (S.equals("MON")){
                        System.out.println("It is Monday today, and six days later, it will be Sunday again");

        }
        else if (S.equals("TUE")){
                        System.out.println("It is Tuesday today, and five days later, it will be Sunday again");

        }
        else if (S.equals("WED")){
                        System.out.println("It is Wednesday today, and four days later, it will be Sunday again");

        }
        else if (S.equals("THU")){
                        System.out.println("It is Thursday today, and three days later, it will be Sunday again");

        }
else if (S.equals("FRI")){
                        System.out.println("It is Friday today, and two days later, it will be Sunday again");

        }        
        else if (S.equals("SAT")){
                        System.out.println("It is Saturday today, and one days later, it will be Sunday again");

        }
    }

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
 public static void main(String[] args) {
               ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java


import java.util.Scanner;


/**
 *
 * @author Mohamed Abd El-Meged
 */
public class JavaApplication1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String S;
        
      
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        if (S.toUpperCase().equals("SUN")){
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again");
        }
        else if (S.equals("MON")){
                        System.out.println("It is Monday today, and six days later, it will be Sunday again");

        }
        else if (S.equals("TUE")){
                        System.out.println("It is Tuesday today, and five days later, it will be Sunday again");

        }
        else if (S.equals("WED")){
                        System.out.println("It is Wednesday today, and four days later, it will be Sunday again");

        }
        else if (S.equals("THU")){
                        System.out.println("It is Thursday today, and three days later, it will be Sunday again");

        }
else if (S.equals("FRI")){
                        System.out.println("It is Friday today, and two days later, it will be Sunday again");

        }        
        else if (S.equals("SAT")){
                        System.out.println("It is Saturday today, and one days later, it will be Sunday again");

        }
    }
    
}


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


    public static void main(String[] args) {
         Scanner r = new Scanner(System.in);
         String day = r.next();
         if (day == "Sunday") {
             System.out.println("7");
            // System.out.println("It is Sunday today, and seven days later, it will be Sunday again.");
         }
         else if (day == "Monday"){
             System.out.println("6");


         }
         else if (day=="Tuesday"){
             System.out.println("5");
         }
         else if (day == "Wednesday"){
             System.out.println("4");
         }
         else if (day == "Thursday"){
             System.out.println("3");}
         else if (day == "Friday"){
             System.out.println("2");}
         else if (day == "Saturday"){
             System.out.println("1");
         }
       }

Compiler output:
Main.java:2: error: unnamed classes are a preview feature and are disabled by default.
    public static void main(String[] args) {
                  ^
  (use --enable-preview to enable unnamed classes)
1 error
Language: Java

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package javaapplication1;

import java.util.Date;
import java.util.Scanner;
import jdk.internal.util.xml.impl.Input;

/**
 *
 * @author Mohamed Abd El-Meged
 */
public class JavaApplication1 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        String S;
        
      
        Scanner sc = new Scanner(System.in);
        S = sc.nextLine();
        if (S.toUpperCase().equals("SUN")){
            System.out.println("It is Sunday today, and seven days later, it will be Sunday again");
        }
        else if (S.equals("MON")){
                        System.out.println("It is Monday today, and six days later, it will be Sunday again");

        }
        else if (S.equals("TUE")){
                        System.out.println("It is Tuesday today, and five days later, it will be Sunday again");

        }
        else if (S.equals("WED")){
                        System.out.println("It is Wednesday today, and four days later, it will be Sunday again");

        }
        else if (S.equals("THU")){
                        System.out.println("It is Thursday today, and three days later, it will be Sunday again");

        }
else if (S.equals("FRI")){
                        System.out.println("It is Friday today, and two days later, it will be Sunday again");

        }        
        else if (S.equals("SAT")){
                        System.out.println("It is Saturday today, and one days later, it will be Sunday again");

        }
    }
    
}


Compiler output:
Main.java:16: error: class JavaApplication1 is public, should be declared in a file named JavaApplication1.java
public class JavaApplication1 {
       ^
Main.java:10: error: package jdk.internal.util.xml.impl is not visible
import jdk.internal.util.xml.impl.Input;
                            ^
  (package jdk.internal.util.xml.impl is declared in module java.base, which does not export it to the unnamed module)
2 errors
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String t = scanner.next();
        System.out.println(Days(t));
    }

    private static int Days(String day){
        String[] days = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
        int counter = 0;
        boolean flag = false;
        for (String s : days) {
            if (day.equals(s)) {
                flag = true;
            }
            if (flag)
                counter++;
        }
        return counter;
    }


Compiler output:
Main.java:22: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String t = scanner.next();
        System.out.println(Days(t));
    }

    private static int Days(String day){
        String[] days = {"SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"};
        int counter = 0;
        boolean flag = false;
        for(int i = 0; i < days.length; i++){
            if(day.equals(days[i])){
                flag = true;
            }
            if(flag)
                counter ++;
        }
        return counter;
    }

Compiler output:
Main.java:22: error: reached end of file while parsing
    }
     ^
1 error
Language: Java

import java.util.*;
public class Content1 {
    public static void main(String[] args) {
        String[] WeekDAYS = new String[]{"SUN","MON","TUE","WED","THU","FRI","SAT"};
        Scanner obj1=new Scanner(System.in);
        String str = obj1.nextLine();
        if (str.equals("SUN"))
            System.out.println(7);
        else if(str.equals("MON"))
            System.out.println(6);
        else if(str.equals("TUE"))
            System.out.println(5);
        else if(str.equals("WED"))
            System.out.println(4);
        else if(str.equals("THU"))
            System.out.println(3);
        else if(str.equals("FRI"))
            System.out.println(2);
        else if(str.equals("SAT"))
            System.out.println(1);



    }

}

Compiler output:
Main.java:2: error: class Content1 is public, should be declared in a file named Content1.java
public class Content1 {
       ^
1 error