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

#include<iostream>
#include<vector>
#include<cstdio>
#include<string>
#include<cmath>
#include<math.h>
#include<algorithm>
#include<string.h>
#include <iomanip>
#include <sstream>
using namespace std;

int main() {
  string s;

  cin >> s;

  if(s == "Sunny"){
    cout << "Cloudy" << endl;
  }else if(s == "Cloudy"){
    cout << "Rainy" << endl;
  else if(s == "Rainy"){
    cout << "Sunny" << endl;
  }
  }

}


Compiler output:
a.cc: In function 'int main()':
a.cc:22:3: error: expected '}' before 'else'
   22 |   else if(s == "Rainy"){
      |   ^~~~
a.cc:20:26: note: to match this '{'
   20 |   }else if(s == "Cloudy"){
      |                          ^
a.cc: At global scope:
a.cc:27:1: error: expected declaration before '}' token
   27 | }
      | ^
Language: C++

#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int S;
  cin >> S;
  if (S == Sunny) {
    cout << "Cloudy" << endl;
} else if (S == Cloudy) {
    cout << "Rainy" << endl;
  } else (S == Rainy) {
	cout << "Sunny" << endl;
  }
   
   
   
 }

Compiler output:
a.cc: In function 'int main()':
a.cc:7:12: error: 'Sunny' was not declared in this scope
    7 |   if (S == Sunny) {
      |            ^~~~~
a.cc:9:17: error: 'Cloudy' was not declared in this scope
    9 | } else if (S == Cloudy) {
      |                 ^~~~~~
a.cc:11:16: error: 'Rainy' was not declared in this scope
   11 |   } else (S == Rainy) {
      |                ^~~~~
Language: C++

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

int main(){
   string s;
   cin >> s;
   if (s = "Sunny"){
     cout << "Cloudy" << endl;
   }
   else if(s == "Cloudy"){
     cout << "Rainy" << endl;
   }
   else {
     cout << "Sunny" << endl;
   }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:10: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Sunny"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   12 |    if (s = "Sunny"){
      |        ~~^~~~~~~~~
      |          |
      |          std::__cxx11::basic_string<char>
Language: C++

#include<iostream>
#include<string>
#include<array>
using namespace std;
int main()
{
  //天気の入力
  string S;
  cin >> S;
  
  //天気の配列
  array<string,3> weather{"Sunny","Cloudy","Rainy"};
  
  //判定
  switch(S){
    case weather[0]:
      cout << weather[1];
      break;
    case weather[1]:
      cout << weather[2];
      break;
    case weather[2]:
      cout << weather[0];
      break;
  }
    return 0;
}

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

#include<iostream>
using namespace std;
int main()
{
  //天気の入力
  string S;
  cin >> S;
  
  //天気の配列
  string[] weather[3];
  weather[3] = {"Sunny","Cloudy","Rainy"};
  
  //判定
  switch(S){
    case weather[0]:
      cout << weather[1];
      break;
    case weather[1];
      cout << weather[2];
      break;
    case weather[2]:
      cout << weather[0];
      break;
  }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:9: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   10 |   string[] weather[3];
      |         ^~
a.cc:10:9: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:10:9: error: empty structured binding declaration
a.cc:10:12: error: expected initializer before 'weather'
   10 |   string[] weather[3];
      |            ^~~~~~~
a.cc:11:3: error: 'weather' was not declared in this scope
   11 |   weather[3] = {"Sunny","Cloudy","Rainy"};
      |   ^~~~~~~
a.cc:14:10: error: switch quantity not an integer
   14 |   switch(S){
      |          ^
a.cc:18:20: error: expected ':' before ';' token
   18 |     case weather[1];
      |                    ^
      |                    :
Language: C

#include<stdio.h>
int main(){
  char a;
  scanf("%s",&a);
  if(a=Sunny){
    printf("Cloudy");
  }
  else if(a=Cloudy){
    printf("Lainy");
  }
  else if(a=Lainy){
    printf("Sunny");
  }
  return 0;}

Compiler output:
main.c: In function 'main':
main.c:5:8: error: 'Sunny' undeclared (first use in this function)
    5 |   if(a=Sunny){
      |        ^~~~~
main.c:5:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:13: error: 'Cloudy' undeclared (first use in this function)
    8 |   else if(a=Cloudy){
      |             ^~~~~~
main.c:11:13: error: 'Lainy' undeclared (first use in this function)
   11 |   else if(a=Lainy){
      |             ^~~~~
Language: C++

#include <bits/stdc++.h.
using namespace std;
int main(){
  string s{};
  cin>>s;
  if(s=="Sunny")
    cout<<"Cloudy";
  else if (s=="Cloudy")
    cout<<"Rainy";
  else
    cout<<"Sunny";
  return 0;
}

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

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

int main() {
  string S;
  cin >> S;
  if(S == "Sunny")
    cout << "Cloudy";
  else if(S == "Cloudy")
    cout << "Rainy";
  else(S == "Rainy")
    cout << "Sunny";
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'cout'
   11 |   else(S == "Rainy")
      |                     ^
      |                     ;
   12 |     cout << "Sunny";
      |     ~~~~             
a.cc:11:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   11 |   else(S == "Rainy")
      |       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  if(S == "Sunny")
    cout << "Cloudy" << endl;
  else if(S == "Cloudy")
    cout << "Rainy" << endl;
  else(S == "Rainy")
    cout << "Sunny" << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:21: error: expected ';' before 'cout'
   11 |   else(S == "Rainy")
      |                     ^
      |                     ;
   12 |     cout << "Sunny" << endl;
      |     ~~~~             
a.cc:11:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   11 |   else(S == "Rainy")
      |       ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

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

int main() {
  string S;
  cin >> S;
  if(S == "Sunny"){
    cout << "Cloudy" << endl;
  }else if(S == "Cloudy"){
    cout << "Rainy" << endl;
  }else(S == "Rainy"){
    cout << "Sunny" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:11:22: error: expected ';' before '{' token
   11 |   }else(S == "Rainy"){
      |                      ^
      |                      ;
a.cc:11:11: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   11 |   }else(S == "Rainy"){
      |        ~~~^~~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3772:5: note: declared here
 3772 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
Language: C++

open System

[<EntryPoint>]
let main _ =
(*
  I'm always watching you...
 _________
/ ___ ___ \
| <●> <●> |
\    |   /
 |  MMM  |
 \  WWW  /
  \_____/
*)
  let s = System.Console.ReadLine()
  let ans =
    match s with
    | "Sunny"  -> "Cloudy"
    | "Cloudy" -> "Rainy"
    | "Rainy"  -> "Sunny"
    | _        -> failwith "error."
  System.Console.WriteLine(ans)
  0

Compiler output:
a.cc:6:4: warning: missing terminating ' character
    6 |   I'm always watching you...
      |    ^
a.cc:6:4: error: missing terminating ' character
    6 |   I'm always watching you...
      |    ^~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:4: error: extended character ● is not valid in an identifier
    9 | | <●> <●> |
      |    ^
a.cc:9:8: error: extended character ● is not valid in an identifier
    9 | | <●> <●> |
      |        ^
a.cc:10:1: error: stray '\' in program
   10 | \    |   /
      | ^
a.cc:12:2: error: stray '\' in program
   12 |  \  WWW  /
      |  ^
a.cc:13:3: error: stray '\' in program
   13 |   \_____/
      |   ^
a.cc:1:1: error: 'open' does not name a type
    1 | open System
      | ^~~~
Language: C++

#include<iostream>
#include<string>
using namespace std;
int main(){
  int count=0;
  string S;
  cin>>S;
  int N = (int)(S.length());
  for(int i=0;i<N;i++){
    if(i%2==0){
      if(S[i]=="L"){
        count++;
        break;
      }
    }else{
      if(S[i]=="R"){
        count++;
        break;
      }
    }
  }
    if(count==0){
      cout<<"Yes"<<endl;
    }else{
      cout<<"No"<<endl;
    }
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |       if(S[i]=="L"){
a.cc:16:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |       if(S[i]=="R"){
Language: C++

#inclede <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  
  if(S == "Sunny") {
    cout << "Cloudy" << endl;
  }
  if(S == "Cloudy") {
    cout << "Rainy" << endl;
  }
  if (S == "Rainy") {
    cour << "Sunny" << endl;
  }
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inclede; did you mean #include?
    1 | #inclede <bits/stdc++.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:4:3: error: 'string' was not declared in this scope
    4 |   string S;
      |   ^~~~~~
a.cc:1:1: note: 'std::string' is defined in header '<string>'; this is probably fixable by adding '#include <string>'
  +++ |+#include <string>
    1 | #inclede <bits/stdc++.h>
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   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 | #inclede <bits/stdc++.h>
a.cc:5:10: error: 'S' was not declared in this scope
    5 |   cin >> S;
      |          ^
a.cc:8:5: error: 'cout' was not declared in this scope
    8 |     cout << "Cloudy" << endl;
      |     ^~~~
a.cc:8:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:25: error: 'endl' was not declared in this scope
    8 |     cout << "Cloudy" << endl;
      |                         ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | #inclede <bits/stdc++.h>
a.cc:11:5: error: 'cout' was not declared in this scope
   11 |     cout << "Rainy" << endl;
      |     ^~~~
a.cc:11:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:11:24: error: 'endl' was not declared in this scope
   11 |     cout << "Rainy" << endl;
      |                        ^~~~
a.cc:11:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:14:5: error: 'cour' was not declared in this scope
   14 |     cour << "Sunny" << endl;
      |     ^~~~
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |     cour << "Sunny" << endl;
      |                        ^~~~
a.cc:14:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include<stdio.h>
#include<string.h>
int main()
{
	char s[101];
	scanf("%s",&s);
	if(s[101]==Sunny){
		printf("Cloudy");
	}else if(s[101]==Cloudy){
		printf("Rainy");
	}else if(s[101]==Rainy){
		printf("Sunny");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:20: error: 'Sunny' was not declared in this scope
    7 |         if(s[101]==Sunny){
      |                    ^~~~~
a.cc:9:26: error: 'Cloudy' was not declared in this scope
    9 |         }else if(s[101]==Cloudy){
      |                          ^~~~~~
a.cc:11:26: error: 'Rainy' was not declared in this scope
   11 |         }else if(s[101]==Rainy){
      |                          ^~~~~
Language: C++

#include<stdio.h>
int main()
{
	char s[101];
	scanf("%s",&s);
	if(s[101]==Sunny){
		printf("Cloudy");
	}else if(s[101]==Cloudy){
		printf("Rainy");
	}else if(s[101]==Rainy){
		printf("Sunny");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:20: error: 'Sunny' was not declared in this scope
    6 |         if(s[101]==Sunny){
      |                    ^~~~~
a.cc:8:26: error: 'Cloudy' was not declared in this scope
    8 |         }else if(s[101]==Cloudy){
      |                          ^~~~~~
a.cc:10:26: error: 'Rainy' was not declared in this scope
   10 |         }else if(s[101]==Rainy){
      |                          ^~~~~
Language: C++

#include<stdio.h>
int main()
{
	char* s[101];
	scanf("%s",&s);
	if(s==Sunny){
		printf("Cloudy");
	}else if(s==Cloudy){
		printf("Rainy");
	}else if(s==Rainy){
		printf("Sunny");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'Sunny' was not declared in this scope
    6 |         if(s==Sunny){
      |               ^~~~~
a.cc:8:21: error: 'Cloudy' was not declared in this scope
    8 |         }else if(s==Cloudy){
      |                     ^~~~~~
a.cc:10:21: error: 'Rainy' was not declared in this scope
   10 |         }else if(s==Rainy){
      |                     ^~~~~
Language: C++

#include<stdio.h>
int main()
{
	char s[101];
	scanf("%s",&s);
	if(s==Sunny){
		printf("Cloudy");
	}else if(s==Cloudy){
		printf("Rainy");
	}else if(s==Rainy){
		printf("Sunny");
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:15: error: 'Sunny' was not declared in this scope
    6 |         if(s==Sunny){
      |               ^~~~~
a.cc:8:21: error: 'Cloudy' was not declared in this scope
    8 |         }else if(s==Cloudy){
      |                     ^~~~~~
a.cc:10:21: error: 'Rainy' was not declared in this scope
   10 |         }else if(s==Rainy){
      |                     ^~~~~
Language: Java

import java.util.*;
public class Main {

	public static void main(String[] args) {
		
		Scanner sc=new Scanner(System.in);
		String s=sc.next();
      	
      	if(s.equals("Sunny")) {
          System.out.println("Cloudy");
        }else if(s.equals("Cloudy")){
          System.out.println("Rainy");
        }else if(s.equals("Rainy")){
          System.out.println("Sunny");
        }
      
      
	}

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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char ara[200];
    gets(ara);
    if(ara[0]=='S')
    {
        cout<<"Cloudy\n";
    }
   else if(ara[0]=='R')
    {
        cout<<"Sunny\n";
    }
    else if(ara[0]=='C')
    {
         cout<<"Rainy\n";
    }
    return 0;
}


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

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char ara[20];
    gets(ara);
    if(ara[0]=='S')
    {
        cout<<"Cloudy\n";
    }
   else if(ara[0]=='R')
    {
        cout<<"Sunny\n";
    }
    else if(ara[0]=='C')
    {
         cout<<"Rainy\n";
    }
    return 0;
}


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

weather = [ 'Sunny', 'Cloudy', 'Rainy' ]
s = input()
idx =  weather.index(s)
if idx == 0:
    print('Cloudy')
elif idx == 1:
    print('Rainy')
else :
    print('Sunny')

Compiler output:
a.cc:1:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | weather = [ 'Sunny', 'Cloudy', 'Rainy' ]
      |             ^~~~~~~
a.cc:1:22: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    1 | weather = [ 'Sunny', 'Cloudy', 'Rainy' ]
      |                      ^~~~~~~~
a.cc:1:32: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | weather = [ 'Sunny', 'Cloudy', 'Rainy' ]
      |                                ^~~~~~~
a.cc:5:11: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    5 |     print('Cloudy')
      |           ^~~~~~~~
a.cc:7:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |     print('Rainy')
      |           ^~~~~~~
a.cc:9:11: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    9 |     print('Sunny')
      |           ^~~~~~~
a.cc:1:1: error: 'weather' does not name a type
    1 | weather = [ 'Sunny', 'Cloudy', 'Rainy' ]
      | ^~~~~~~
Language: C++

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

int main() {
    string s;
    cin >> s;
    if(s == "Sunny") cout << "Cloudy" << endl; 
    if(s == "Cloudy") cout << "Rainy" << endl;
    if(s == "Rainy") cout << "Sunny" << endl;
    return 0;


Compiler output:
a.cc: In function 'int main()':
a.cc:10:14: error: expected '}' at end of input
   10 |     return 0;
      |              ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

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

int main() {
	// your code goes here
	char c;
	cin >> c;
	if(c[0]=='S') cout << "Cloudy" << endl;
	if(c[0]=='C') cout << "Rainy" << endl;
	if(c[0]=='R') cout << "Sunny" << endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:13: error: invalid types 'char[int]' for array subscript
    8 |         if(c[0]=='S') cout << "Cloudy" << endl;
      |             ^
a.cc:9:13: error: invalid types 'char[int]' for array subscript
    9 |         if(c[0]=='C') cout << "Rainy" << endl;
      |             ^
a.cc:10:13: error: invalid types 'char[int]' for array subscript
   10 |         if(c[0]=='R') cout << "Sunny" << endl;
      |             ^
Language: C++

#include <stdio.h>
int main(void){
  string b;
  scanf("%s",&b);
  printf("%s",b);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    3 |   string b;
      |   ^~~~~~
      |   stdin
a.cc:4:15: error: 'b' was not declared in this scope
    4 |   scanf("%s",&b);
      |               ^
Language: Java

import java.util.Scanner;
public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    String S = sc.nextLine();
    if(S.equals("Sunny")) {
      System.out.println("Cloud");
    }else if(S.equals("Cloud")) {
      System.out.println("Rainy");
    }else if(S.equals("Rainy")) {
      System.out.prinltn("Sunny");
    }
  }
}
  

Compiler output:
Main.java:11: error: cannot find symbol
      System.out.prinltn("Sunny");
                ^
  symbol:   method prinltn(String)
  location: variable out of type PrintStream
1 error
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin>>s;
  if(s=="Sunny")
    cout<<"Cloudy";
  if(s=="Cloudy")
    cout<<"Rainy";
  if(s=="Rainy")
    cout<<"Sunny"
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:18: error: expected ';' before 'return'
   11 |     cout<<"Sunny"
      |                  ^
      |                  ;
   12 |   return 0;
      |   ~~~~~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main()
{
  string s;cin>>s;
  if(s=="Sunny") cout<<"Cloudy":
  else if(s=="Cloudy") cout<<"Rainy";
  else cout<<"Sunny";
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:32: error: expected ';' before ':' token
    6 |   if(s=="Sunny") cout<<"Cloudy":
      |                                ^
      |                                ;
Language: Java

import java.util.*;
class Wandbox
{
    public static void main(String[] args)
    {
        
        Scanner sc = new Scanner(System.in);
        
        String a = sc.next();
        
        switch (a) {
            case "Sunny":
                System.out.println('Cloudy');
            case "Cloudy":
                System.out.println('Rainy');
            case "Rainy":
                System.out.println('Sunny');        
        }
       
    }
}

Compiler output:
Main.java:13: error: unclosed character literal
                System.out.println('Cloudy');
                                   ^
Main.java:13: error: unclosed character literal
                System.out.println('Cloudy');
                                          ^
Main.java:13: error: not a statement
                System.out.println('Cloudy');
                                     ^
Main.java:15: error: unclosed character literal
                System.out.println('Rainy');
                                   ^
Main.java:15: error: unclosed character literal
                System.out.println('Rainy');
                                         ^
Main.java:15: error: not a statement
                System.out.println('Rainy');
                                     ^
Main.java:17: error: unclosed character literal
                System.out.println('Sunny');        
                                   ^
Main.java:17: error: unclosed character literal
                System.out.println('Sunny');        
                                         ^
Main.java:17: error: not a statement
                System.out.println('Sunny');        
                                     ^
9 errors
Language: Java

impoty java.util.*;
class Main
{
    public static void main(String[] args)
    {
        
        Scanner sc = new Scanner(System.in);
        
        String a = sc.next();
        
        switch (a) {
            case "Sunny":
                System.out.println('Cloudy');
            case "Cloudy":
                System.out.println('Rainy');
            case "Rainy":
                System.out.println('Sunny');        
        }
       
    }
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
impoty java.util.*;
^
Main.java:13: error: unclosed character literal
                System.out.println('Cloudy');
                                   ^
Main.java:13: error: unclosed character literal
                System.out.println('Cloudy');
                                          ^
Main.java:13: error: not a statement
                System.out.println('Cloudy');
                                     ^
Main.java:15: error: unclosed character literal
                System.out.println('Rainy');
                                   ^
Main.java:15: error: unclosed character literal
                System.out.println('Rainy');
                                         ^
Main.java:15: error: not a statement
                System.out.println('Rainy');
                                     ^
Main.java:17: error: unclosed character literal
                System.out.println('Sunny');        
                                   ^
Main.java:17: error: unclosed character literal
                System.out.println('Sunny');        
                                         ^
Main.java:17: error: not a statement
                System.out.println('Sunny');        
                                     ^
10 errors
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
  string S;
  cin>>S;
  int i;
  for(i=0;i<S.size();++i)
  {
    if(S[i]=="R"&&i%2==0) 
    {
      cout<<"NO"<<endl;
      break;
    }
    {
      if(S[i]=="L"&&i%2!=0) cout<<"NO"<<endl;
      break;
    }
  }
  if(i==S.size()) cout<<"YES"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     if(S[i]=="R"&&i%2==0)
a.cc:18:14: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |       if(S[i]=="L"&&i%2!=0) cout<<"NO"<<endl;
Language: C++

#include<iostream>
#include<string>
#include<vector>
using namespace std;
int main()
{
  string S;
  cin>>S;
  for(int i=0;i<S.size();++i)
  {
    if(S[i]=='R'&&i%2==0) 
    {
      cout<<"NO"<<endl;
      break;
    }
    {
      if(S[i]=='L'&&i%2!=0) cout<<"NO"<<endl;
      break;
    }
  }
  if(i==S.size()) cout<<"YES"<<endl;
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:21:6: error: 'i' was not declared in this scope
   21 |   if(i==S.size()) cout<<"YES"<<endl;
      |      ^
Language: Java

import java.util.Scanner
public class Main {
    public static void main(String[] args) {
        Scanner cin =new Scanner(System.in);
        String weather []={"Sunny","Cloudy", "Rainy"} ;
       // Vector v=new Vector();
        //String []w=new String [3];
        String today=cin.next();
        for(int i=0;i<2;i++){
            if(today.equals(weather[i])){
                System.out.println(weather[i+1]);
            }
        }
        if(weather[2].equals(today))
            System.out.println("Sunny");
        cin.close();
    }
}


Compiler output:
Main.java:1: error: ';' expected
import java.util.Scanner
                        ^
1 error
Language: C

#include <stdio.h>
int main(){
#include<stdio.h>
#include<string.h>
int main()
{
	char str[1000];
	gets(str);
	if(strcmp(str,"Sunny")==0)
	{
		printf("Cloudy\n");
	}
	else if(strcmp(str,"Cloudy")==0)
	{
		printf("Rainy\n");
	}
	else if(strcmp(str,"Rainy")==0)
	{
		printf("Sunny\n");
	}
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:9: error: implicit declaration of function 'gets'; did you mean 'fgets'? [-Wimplicit-function-declaration]
    8 |         gets(str);
      |         ^~~~
      |         fgets
main.c: In function 'main':
main.c:22:1: error: expected declaration or statement at end of input
   22 | }
      | ^
Language: C++

#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if((S==(*iter)) cout<<*(iter+1)<<endl;
    if((S==*(iter+1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:20: error: expected ';' before 'cout'
   12 |     if((S==(*iter)) cout<<*(iter+1)<<endl;
      |                    ^~~~~
      |                    ;
a.cc:12:10: warning: ignoring return value of 'bool std::operator==(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&) [with _CharT = char; _Traits = char_traits<char>; _Alloc = allocator<char>]', declared with attribute 'nodiscard' [-Wunused-result]
   12 |     if((S==(*iter)) cout<<*(iter+1)<<endl;
      |        ~~^~~~~~~~~~
In file included from /usr/include/c++/14/string:54,
                 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,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/basic_string.h:3755:5: note: declared here
 3755 |     operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
      |     ^~~~~~~~
a.cc:13:5: error: expected primary-expression before 'if'
   13 |     if((S==*(iter+1)) cout<<x[0];
      |     ^~
a.cc:12:43: error: expected ')' before 'if'
   12 |     if((S==(*iter)) cout<<*(iter+1)<<endl;
      |       ~                                   ^
      |                                           )
   13 |     if((S==*(iter+1)) cout<<x[0];
      |     ~~
Language: C++

#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(!compare(S,(*iter)) cout<<*(iter+1)<<endl;
    if(!compare(S,*(iter+1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:9: error: 'compare' was not declared in this scope
   12 |     if(!compare(S,(*iter)) cout<<*(iter+1)<<endl;
      |         ^~~~~~~
a.cc:13:5: error: expected primary-expression before 'if'
   13 |     if(!compare(S,*(iter+1)) cout<<x[0];
      |     ^~
a.cc:12:50: error: expected ')' before 'if'
   12 |     if(!compare(S,(*iter)) cout<<*(iter+1)<<endl;
      |       ~                                          ^
      |                                                  )
   13 |     if(!compare(S,*(iter+1)) cout<<x[0];
      |     ~~
Language: C

#include <stdio.h>
int main(){
  string s;
  scanf("%s",s);
  if(s=='Sunny'){
    printf("Cloudy");
  }
  else if(s=='Cloudy'){
    printf("Rainy");
  }
  else if(s=='Rainy'){
    printf("Sunny");
  }
  else{
    printf("\n");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:3:3: error: unknown type name 'string'; did you mean 'stdin'?
    3 |   string s;
      |   ^~~~~~
      |   stdin
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny'){
      |         ^~~~~~~
main.c:8:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    8 |   else if(s=='Cloudy'){
      |              ^~~~~~~~
main.c:11:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   11 |   else if(s=='Rainy'){
      |              ^~~~~~~
Language: C++

#include <stdio.h>
int main(){
  string s;
  scanf("%s",s);
  if(s=='Sunny'){
    printf("Cloudy");
  }
  else if(s=='Cloudy'){
    printf("Rainy");
  }
  else if(s=='Rainy'){
    printf("Sunny");
  }
  else{
    printf("\n");
  }
  return 0;
}

Compiler output:
a.cc:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny'){
      |         ^~~~~~~
a.cc:8:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    8 |   else if(s=='Cloudy'){
      |              ^~~~~~~~
a.cc:11:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   11 |   else if(s=='Rainy'){
      |              ^~~~~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope; did you mean 'stdin'?
    3 |   string s;
      |   ^~~~~~
      |   stdin
a.cc:4:14: error: 's' was not declared in this scope
    4 |   scanf("%s",s);
      |              ^
Language: C++

#include <stdio.h>
int main(){
  char s[10];
  scanf("%s",s);
  if(s=='Sunny'){
    printf("Cloudy");
  }
  else if(s=='Cloudy'){
    printf("Rainy");
  }
  else if(s=='Rainy'){
    printf("Sunny");
  }
  else{
    printf("\n");
  }
  return 0;
}

Compiler output:
a.cc:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny'){
      |         ^~~~~~~
a.cc:8:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    8 |   else if(s=='Cloudy'){
      |              ^~~~~~~~
a.cc:11:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   11 |   else if(s=='Rainy'){
      |              ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:7: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(s=='Sunny'){
      |      ~^~~~~~~~~
a.cc:8:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   else if(s=='Cloudy'){
      |           ~^~~~~~~~~~
a.cc:11:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |   else if(s=='Rainy'){
      |           ~^~~~~~~~~
Language: C++

#include<iostream>
#inlcude<vector>
#include<string>
using namespace std;
int mian()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(S==*iter) cout<<*(iter+1)<<endl;
    if(S==(x.end()-1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<vector>
      |  ^~~~~~~
      |  include
a.cc: In function 'int mian()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #inlcude<vector>
a.cc:7:16: error: expected primary-expression before '>' token
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                ^
a.cc:7:18: error: 'x' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                  ^
Language: C++

#include<iostream>
#inlcude<vector>
#include<string>
using namespace std;
main()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(S==*iter) cout<<*(iter+1)<<endl;
    if(S==(x.end()-1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<vector>
      |  ^~~~~~~
      |  include
a.cc:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    5 | main()
      | ^~~~
a.cc: In function 'int main()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #inlcude<vector>
a.cc:7:16: error: expected primary-expression before '>' token
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                ^
a.cc:7:18: error: 'x' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                  ^
Language: C++

#include<iostream>
#inlcude<vector>
#include<string>
using namespace std;
mian()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(S==*iter) cout<<*(iter+1)<<endl;
    if(S==(x.end()-1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc:2:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    2 | #inlcude<vector>
      |  ^~~~~~~
      |  include
a.cc:5:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    5 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:7:3: error: 'vector' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | #inlcude<vector>
a.cc:7:16: error: expected primary-expression before '>' token
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                ^
a.cc:7:18: error: 'x' was not declared in this scope
    7 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                  ^
Language: C++

#include<iostream>
using namespace std;
mian()
{
  vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(S==*iter) cout<<*(iter+1)<<endl;
    if(S==(x.end()-1)) cout<<x[0];
  }
  return 0;
}


Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:5:3: error: 'vector' was not declared in this scope
    5 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |   ^~~~~~
a.cc:2:1: note: 'std::vector' is defined in header '<vector>'; this is probably fixable by adding '#include <vector>'
    1 | #include<iostream>
  +++ |+#include <vector>
    2 | using namespace std;
a.cc:5:16: error: expected primary-expression before '>' token
    5 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                ^
a.cc:5:18: error: 'x' was not declared in this scope
    5 |   vector<string> x{"Sunny", "Cloudy", "Rainy", "Sunny", "Cloudy", "Rainy"};
      |                  ^
Language: C++

#include<iostream>
using namespace std;
mian()
{
  enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
  string S;
  cin>>S;
  for(auto iter=x.begin();iter!=x.end()-1;++iter)
  {
    if(S==*iter) cout<<*(iter+1)<<endl;
    if(S==(x.end()-1)) cout<<x[0];
  }
  return 0;
}

Compiler output:
a.cc:3:1: error: ISO C++ forbids declaration of 'mian' with no type [-fpermissive]
    3 | mian()
      | ^~~~
a.cc: In function 'int mian()':
a.cc:5:32: error: redeclaration of 'Sunny'
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |                                ^~~~~
a.cc:5:10: note: 'Sunny' previously declared here
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |          ^~~~~
a.cc:5:39: error: redeclaration of 'Cloudy'
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |                                       ^~~~~~
a.cc:5:17: note: 'Cloudy' previously declared here
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |                 ^~~~~~
a.cc:5:47: error: redeclaration of 'Rainy'
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |                                               ^~~~~
a.cc:5:25: note: 'Rainy' previously declared here
    5 |   enum x{Sunny, Cloudy, Rainy, Sunny, Cloudy, Rainy};
      |                         ^~~~~
a.cc:8:18: error: expected primary-expression before '.' token
    8 |   for(auto iter=x.begin();iter!=x.end()-1;++iter)
      |                  ^
a.cc:8:34: error: expected primary-expression before '.' token
    8 |   for(auto iter=x.begin();iter!=x.end()-1;++iter)
      |                                  ^
a.cc:11:13: error: expected primary-expression before '.' token
   11 |     if(S==(x.end()-1)) cout<<x[0];
      |             ^
a.cc:11:31: error: expected primary-expression before '[' token
   11 |     if(S==(x.end()-1)) cout<<x[0];
      |                               ^
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S[3]={"Sunny","Cloudy","Rainy"};
  	int w;
  	char weather;
	
  	cin>>weather;
  
  	if(weather==S[0])
      cout<<S[1];
    else if(weather==S[1])
      cout<<S[2];
    else if(weather==S[2])
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                   ^~~~~~~
      |                   |
      |                   const char*
a.cc:5:27: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                           ^~~~~~~~
      |                           |
      |                           const char*
a.cc:5:36: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                                    ^~~~~~~
      |                                    |
      |                                    const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S[3]={"Sunny","Cloudy","Rainy"};
  	int weather,w;
	
  	cin>>weather;
  
  	if(weather==S[0])
      cout<<S[1];
    else if(weather==S[1])
      cout<<S[2];
    else if(weather==S[2])
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                   ^~~~~~~
      |                   |
      |                   const char*
a.cc:5:27: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                           ^~~~~~~~
      |                           |
      |                           const char*
a.cc:5:36: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                                    ^~~~~~~
      |                                    |
      |                                    const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S[3]={"Sunny","Cloudy","Rainy"};
  	int weather,w;
	
  	cin>>weather;
  
  	if(weather==S[0])
      cout<<S[1];
    else if(weather==S[1])
      cout<<S[2];
    else 
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                   ^~~~~~~
      |                   |
      |                   const char*
a.cc:5:27: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                           ^~~~~~~~
      |                           |
      |                           const char*
a.cc:5:36: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                                    ^~~~~~~
      |                                    |
      |                                    const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S[3]={"Sunny","Cloudy","Rainy"};
  	int weather,w;
	
  	cin>>weather;
  
  	if (weather==S[0])
      cout<<S[1];
    else if (weather==S[1])
      cout<<S[2];
    else 
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                   ^~~~~~~
      |                   |
      |                   const char*
a.cc:5:27: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                           ^~~~~~~~
      |                           |
      |                           const char*
a.cc:5:36: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    5 |         int S[3]={"Sunny","Cloudy","Rainy"};
      |                                    ^~~~~~~
      |                                    |
      |                                    const char*
Language: C++

#include<iostream>
using namespace std;

int main(){
	int S[3]=["Sunny","Cloudy","Rainy"];
  	int weather,w;
	
  	cin>>weather;
  
  	if (weather==S[0])
      cout<<S[1];
    else if (weather==S[1])
      cout<<S[2];
    else 
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:19: error: expected identifier before string constant
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |                   ^~~~~~~
a.cc:5:26: error: expected ']' before ',' token
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |                          ^
      |                          ]
a.cc: In lambda function:
a.cc:5:26: error: expected '{' before ',' token
a.cc: In function 'int main()':
a.cc:5:18: error: array must be initialized with a brace-enclosed initializer
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |                  ^~~~~~~~
a.cc:5:27: error: expected unqualified-id before string constant
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |                           ^~~~~~~~
Language: C++

#include<iostream>
using namespace std;

int main{
	int S[3]=["Sunny","Cloudy","Rainy"];
  	int weather,w;
	
  	cin>>weather;
  
  	if (weather==S[0])
      cout<<S[1];
    else if (weather==S[1])
      cout<<S[2];
    else 
      cout<<S[0];
      
    return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:9: error: expected primary-expression before 'int'
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |         ^~~
a.cc:5:9: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:9: error: 'cin' does not name a type
    8 |         cin>>weather;
      |         ^~~
a.cc:10:9: error: expected unqualified-id before 'if'
   10 |         if (weather==S[0])
      |         ^~
a.cc:12:5: error: expected unqualified-id before 'else'
   12 |     else if (weather==S[1])
      |     ^~~~
a.cc:14:5: error: expected unqualified-id before 'else'
   14 |     else
      |     ^~~~
a.cc:17:5: error: expected unqualified-id before 'return'
   17 |     return 0;
      |     ^~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

int main{
	int S[3]=["Sunny","Cloudy","Rainy"];
  	int weather,w;
	
  	cin>>weather;
  
  	if (weather==S[0])
      cout<<S[1];
    else if (weather==S[1])
      cout<<S[2]
    else 
      cout<<S[0]
      
    return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:9: error: expected primary-expression before 'int'
    5 |         int S[3]=["Sunny","Cloudy","Rainy"];
      |         ^~~
a.cc:5:9: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:9: error: 'cin' does not name a type
    8 |         cin>>weather;
      |         ^~~
a.cc:10:9: error: expected unqualified-id before 'if'
   10 |         if (weather==S[0])
      |         ^~
a.cc:12:5: error: expected unqualified-id before 'else'
   12 |     else if (weather==S[1])
      |     ^~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

#include<iostream>
using namespace std;
int main(){
  int n,k,q,a;
  cin >> n >> k >> q;
  for(int i=0;i<n;i++){
   int a[i]=k;
  }
  for(int i=0;i<q;i++){
    cin >> a;
    int a[a-1]!--;
  }
  for(int i=0;i<n;i++){
    if(a[i]<=0){
      cout << "no" << endl;
    }
    else{
      cout << "yes" << endl;
    }
  }
  return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: array must be initialized with a brace-enclosed initializer
    7 |    int a[i]=k;
      |             ^
a.cc:11:15: error: expected initializer before '!' token
   11 |     int a[a-1]!--;
      |               ^
a.cc:14:9: error: invalid types 'int[int]' for array subscript
   14 |     if(a[i]<=0){
      |         ^