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

#include<iostream>
using namespace std;

int m ain(){
  string now;
  cin>>now;
  if(now=="Sunny"){
    cout << "Cloudy";
  }
  
  if(now == "Cloudy"){
    cout << "Rainy";
  }
  
  if(now == "Rainy"){
  	cout << "Sunny";
  }
	return 0;
}

Compiler output:
a.cc:4:7: error: expected initializer before 'ain'
    4 | int m ain(){
      |       ^~~
Language: C++

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:10: error: conflicting declaration 'std::string S'
    6 |   string S;
      |          ^
a.cc:5:7: note: previous declaration as 'int S'
    5 |   int S;
      |       ^
a.cc:9:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   if (S == "Sunny") {
      |       ~~^~~~~~~~~~
a.cc:13:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |   if (S == "Cloudy") {
      |       ~~^~~~~~~~~~~
a.cc:17:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   17 |   if (S == "Rainy") {
      |       ~~^~~~~~~~~~
Language: C++

#include <iostream>
#include <cstring>
#include <vector>
#include <algorithm>
#include <numeric>
#include <mutex>
#include <cmath>
#include <set>
#include <climits>
#define lli long long int
#define ll long long
#define mod 1000000007
#define pii pair<int,int>
#define mp make_pair
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
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:25:20: error: expected ';' before '}' token
   25 |     cout << "Rainy"
      |                    ^
      |                    ;
   26 |   }
      |   ~
Language: C++

#incoude<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  cout << s;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #incoude; did you mean #include?
    1 | #incoude<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 | #incoude<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 | #incoude<bits/stdc++.h>
a.cc:5:10: error: 's' was not declared in this scope
    5 |   cin >> s;
      |          ^
a.cc:6:3: error: 'cout' was not declared in this scope
    6 |   cout << s;
      |   ^~~~
a.cc:6:3: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
Language: C++

#include <iostream>
using namespace std;

int main()
{
	char str[10];
	cin >> str;

	if (strcmp(str, "Sunny") == 0)
		cout << "Cloudy";

	if (strcmp(str, "Cloudy") == 0)
		cout << "Rainy";

	if (strcmp(str, "Rainy") == 0)
		cout << "Sunny";

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:13: error: 'strcmp' was not declared in this scope
    9 |         if (strcmp(str, "Sunny") == 0)
      |             ^~~~~~
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;
a.cc:12:13: error: 'strcmp' was not declared in this scope
   12 |         if (strcmp(str, "Cloudy") == 0)
      |             ^~~~~~
a.cc:12:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
a.cc:15:13: error: 'strcmp' was not declared in this scope
   15 |         if (strcmp(str, "Rainy") == 0)
      |             ^~~~~~
a.cc:15:13: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
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");
  }
}

Compiler output:
main.c:21:1: error: expected identifier or '(' before '}' token
   21 | }
      | ^
Language: Java

import java.util.*;
public class bunai{
    public static void main(String[] args){
        Scanner s= new Scanner(System.in);
        String w=s.nextLine();
        if(w.equals("Sunny"))
            System.out.print("Cloudy");
        else if(w.equals("Cloudy"))
            System.out.print("Rainy");
        else
            System.out.print("Sunny");}
}


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

#include<iostream.h>

int main()
{
  
  String enter;
  cin>>enter;
  if(enter=="Sunny")
     cout<<"Cloudy";
  else
    if(enter=="Cloudy")
      cout<<<"Rainy";
  else
    if(enter=="Rainy")
      cout<<"Sunny";
  
  return 0;
  
}

Compiler output:
a.cc:1:9: fatal error: iostream.h: No such file or directory
    1 | #include<iostream.h>
      |         ^~~~~~~~~~~~
compilation terminated.
Language: C

#include<stdio.h>
int main()
{
  chat s[5];
  int n,1==sunny,2==cloudy,3==rainy;
  scanf("%d",n);
  if(n=1)
    printf("2");
  break;
  if(n=2)
    printf("3");
  break;
  if(n=3)
    printf("1");
  break;
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'chat'; did you mean 'char'?
    4 |   chat s[5];
      |   ^~~~
      |   char
main.c:5:9: error: expected identifier or '(' before numeric constant
    5 |   int n,1==sunny,2==cloudy,3==rainy;
      |         ^
main.c:9:3: error: break statement not within loop or switch
    9 |   break;
      |   ^~~~~
main.c:12:3: error: break statement not within loop or switch
   12 |   break;
      |   ^~~~~
main.c:15:3: error: break statement not within loop or switch
   15 |   break;
      |   ^~~~~
Language: C++

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

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

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

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:1:10: fatal error: pch.h: No such file or directory
    1 | #include "pch.h"
      |          ^~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(){
  char s[10];
  for(i=0;i<=10;i++){
    scanf("%d", s[i]);
  }
  
  if(s[0]=='S'){
    printf("Cloudy");
  }
  else if(s[0]=='C'){
    printf("Rainy");
  }
  else if(s[0]=='R'){
    printf("Sunny");
  }
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:7: error: 'i' undeclared (first use in this function)
    5 |   for(i=0;i<=10;i++){
      |       ^
main.c:5:7: note: each undeclared identifier is reported only once for each function it appears in
Language: C++

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

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

Compiler output:
a.cc:8:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |   if (S == 'Sunny') {
      |            ^~~~~~~
a.cc:9:13: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |     cout << 'Cloudy' << endl;
      |             ^~~~~~~~
a.cc:12:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   12 |     if (S == 'Cloudy') {
      |              ^~~~~~~~
a.cc:13:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   13 |     cout << 'Rainy' << endl;
      |             ^~~~~~~
a.cc:16:14: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   16 |     if (S == 'Rainy') {
      |              ^~~~~~~
a.cc:17:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   17 |     cout << 'Sunny' << endl;
      |             ^~~~~~~
a.cc:20:1: error: expected declaration before '}' token
   20 | }
      | ^
Language: C++

#include <iostream>


int main() {

	std::string weather;
	std::cin >> weather;

	switch (weather) {
	case "Rainy":
		std::cout << "Cloudy" << std::endl;
		break;
	case "Cloudy":
		std::cout << "Rainy" << std::endl;
		break;
	case "Sunny":
		std::cout << "Sunny" << std::endl;
		break;
	}

	return 0;
}

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

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


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

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

int main(){
  string s;
  cin >> s;
  if(s[0] == 'S') cout << "Cloudy" << endl;
  if(s[0] == 'C') cout << "Rainy" << endl;
  if(s[0] == 'R') cout << "Sunny" << endl;
  return 0;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #including; did you mean #include?
    1 | #including <iostream>
      |  ^~~~~~~~~
      |  include
a.cc:2:2: error: invalid preprocessing directive #including; did you mean #include?
    2 | #including <string>
      |  ^~~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   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 | #including <iostream>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 | #including <iostream>
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:19: error: 'cout' was not declared in this scope
    8 |   if(s[0] == 'S') cout << "Cloudy" << endl;
      |                   ^~~~
a.cc:8:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:39: error: 'endl' was not declared in this scope
    8 |   if(s[0] == 'S') 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 | #including <iostream>
a.cc:9:19: error: 'cout' was not declared in this scope
    9 |   if(s[0] == 'C') cout << "Rainy" << endl;
      |                   ^~~~
a.cc:9:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:38: error: 'endl' was not declared in this scope
    9 |   if(s[0] == 'C') cout << "Rainy" << endl;
      |                                      ^~~~
a.cc:9:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:10:19: error: 'cout' was not declared in this scope
   10 |   if(s[0] == 'R') cout << "Sunny" << endl;
      |                   ^~~~
a.cc:10:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:38: error: 'endl' was not declared in this scope
   10 |   if(s[0] == 'R') cout << "Sunny" << endl;
      |                                      ^~~~
a.cc:10:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: Java

public class App {
    public static void main(String[] args) throws Exception {
        String todayWeather = args[0];
        if(todayWeather.equals("Sunny")){
            System.out.println("Cloudy");
        }else if(todayWeather.equals("Cloudy")){
            System.out.println("Rainy");
        } else{
            System.out.println("Sunny");
        }
    }
}

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

# include <iostream>


int main() {

	std::string weather;
	std::cin >> weather;

	switch (weather) {
	case "Rainy":
		std::cout << "Cloudy" << std::endl;
		break;
	case "Cloudy":
		std::cout << "Rainy" << std::endl;
		break;
	case "Sunny":
		std::cout << "Sunny" << std::endl;
		break;
	}

	return 0;
}

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

#include <stdio.h>

void main(){
  char c=getcher();
  if(c=='C'){
    puts("Rainy");
  }else{
    if(c=='R'){
      puts("Sunny");
    }else{
      puts("Cloudy")
    }
  }
}


Compiler output:
main.c: In function 'main':
main.c:4:10: error: implicit declaration of function 'getcher'; did you mean 'getchar'? [-Wimplicit-function-declaration]
    4 |   char c=getcher();
      |          ^~~~~~~
      |          getchar
main.c:11:21: error: expected ';' before '}' token
   11 |       puts("Cloudy")
      |                     ^
      |                     ;
   12 |     }
      |     ~
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:6:9: error: 'Sunny' undeclared (first use in this function)
    6 |   if(s==Sunny){printf("%s\n", Cloudy);}
      |         ^~~~~
main.c:6:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:31: error: 'Cloudy' undeclared (first use in this function)
    6 |   if(s==Sunny){printf("%s\n", Cloudy);}
      |                               ^~~~~~
main.c:7:32: error: 'Rainy' undeclared (first use in this function)
    7 |   if(s==Cloudy){printf("%s\n", Rainy);}
      |                                ^~~~~
Language: Java

import java.util.Scanner;

public class ABC141a{
	public static void main(String args[]){
		Scanner scan = new Scanner(System.in);
		String S = scan.next();

		switch(S){
			case "Sunny":
			System.out.println("Cloudy");
			break;
			case "Cloudy":
			System.out.println("Rainy");
			break;
			case "Rainy":
			System.out.println("Sunny");
			break;
		}
	}
}

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

#include <stdio.h>
int main(){
  char weather[6];
  gets(weather);
  if(weather=='Sunny'){
    printf("Cloudy\n");
    return 0;
  }
  else if(weather=='Cloudy'){
    printf("Rainy\n");
    return 0;
  }
  else{
    printf("Sunny\n");
    return 0;
  }
}

Compiler output:
a.cc:5:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(weather=='Sunny'){
      |               ^~~~~~~
a.cc:9:20: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |   else if(weather=='Cloudy'){
      |                    ^~~~~~~~
a.cc: In function 'int main()':
a.cc:4:3: error: 'gets' was not declared in this scope; did you mean 'getw'?
    4 |   gets(weather);
      |   ^~~~
      |   getw
a.cc:5:13: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    5 |   if(weather=='Sunny'){
      |      ~~~~~~~^~~~~~~~~
a.cc:9:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |   else if(weather=='Cloudy'){
      |           ~~~~~~~^~~~~~~~~~
Language: C++

#include <string>
using namespace std;
 
int main() {
  string wather;
  cin >> wather;
 
  // 以下のコメント/* */を消して追記する
  if (wather == "Sunny") {
    cout << "Cloudy" << endl;
  }
  
   if (wather == "Cloudy") {
    cout << "Rainy" << endl;
  }
  
   if (wather == "Rainy") {
    cout << "Sunny" << endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:3: error: 'cin' was not declared in this scope
    6 |   cin >> wather;
      |   ^~~
a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    1 | #include <string>
  +++ |+#include <iostream>
    2 | using namespace std;
a.cc:10:5: error: 'cout' was not declared in this scope
   10 |     cout << "Cloudy" << endl;
      |     ^~~~
a.cc:10:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:25: error: 'endl' was not declared in this scope
   10 |     cout << "Cloudy" << endl;
      |                         ^~~~
a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    1 | #include <string>
  +++ |+#include <ostream>
    2 | using namespace std;
a.cc:14:5: error: 'cout' was not declared in this scope
   14 |     cout << "Rainy" << endl;
      |     ^~~~
a.cc:14:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:14:24: error: 'endl' was not declared in this scope
   14 |     cout << "Rainy" << endl;
      |                        ^~~~
a.cc:14:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:18:5: error: 'cout' was not declared in this scope
   18 |     cout << "Sunny" << endl;
      |     ^~~~
a.cc:18:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:18:24: error: 'endl' was not declared in this scope
   18 |     cout << "Sunny" << endl;
      |                        ^~~~
a.cc:18:24: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

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

int main() {
  String S;
  cin >> S;
  
  String ans = 'Sunny';
  if (S=='Sunny') ans = 'Cloudy';
  else if (S=='Cloudy') ans = 'Rainy';
  else if (S=='Rainy') ans = 'Sunny';
  
  cout << ans << endl;
  
}

Compiler output:
a.cc:8:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |   String ans = 'Sunny';
      |                ^~~~~~~
a.cc:9:10: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    9 |   if (S=='Sunny') ans = 'Cloudy';
      |          ^~~~~~~
a.cc:9:25: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |   if (S=='Sunny') ans = 'Cloudy';
      |                         ^~~~~~~~
a.cc:10:15: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   10 |   else if (S=='Cloudy') ans = 'Rainy';
      |               ^~~~~~~~
a.cc:10:31: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   10 |   else if (S=='Cloudy') ans = 'Rainy';
      |                               ^~~~~~~
a.cc:11:15: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   11 |   else if (S=='Rainy') ans = 'Sunny';
      |               ^~~~~~~
a.cc:11:30: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   11 |   else if (S=='Rainy') ans = 'Sunny';
      |                              ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'String' was not declared in this scope
    5 |   String S;
      |   ^~~~~~
a.cc:6:10: error: 'S' was not declared in this scope
    6 |   cin >> S;
      |          ^
a.cc:8:9: error: expected ';' before 'ans'
    8 |   String ans = 'Sunny';
      |         ^~~~
      |         ;
a.cc:9:19: error: 'ans' was not declared in this scope; did you mean 'abs'?
    9 |   if (S=='Sunny') ans = 'Cloudy';
      |                   ^~~
      |                   abs
a.cc:10:25: error: 'ans' was not declared in this scope; did you mean 'abs'?
   10 |   else if (S=='Cloudy') ans = 'Rainy';
      |                         ^~~
      |                         abs
a.cc:11:24: error: 'ans' was not declared in this scope; did you mean 'abs'?
   11 |   else if (S=='Rainy') ans = 'Sunny';
      |                        ^~~
      |                        abs
a.cc:13:11: error: 'ans' was not declared in this scope; did you mean 'abs'?
   13 |   cout << ans << endl;
      |           ^~~
      |           abs
Language: C++

//include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//math
//-------------------------------------------
template<class T> inline T sqr(T x) {return x*x;}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

int main(){
    char S;
    cin >> S;
    if(S.compare("Sunny")==0) cout << "Cloudy";
    if(S.compare("Cloudy")==0) cout << "Rainy";
    if(S.compare("Rainy")==0) cout << "Sunny";

    cout << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:75:10: error: request for member 'compare' in 'S', which is of non-class type 'char'
   75 |     if(S.compare("Sunny")==0) cout << "Cloudy";
      |          ^~~~~~~
a.cc:76:10: error: request for member 'compare' in 'S', which is of non-class type 'char'
   76 |     if(S.compare("Cloudy")==0) cout << "Rainy";
      |          ^~~~~~~
a.cc:77:10: error: request for member 'compare' in 'S', which is of non-class type 'char'
   77 |     if(S.compare("Rainy")==0) cout << "Sunny";
      |          ^~~~~~~
Language: C++

include <iostream>
using namespace std;

int main() {

    string s; cin >> s;
    if (s[0] == 'S') cout << "Cloudy" << endl;
    else if (s[0] == 'C') cout << "Rainy" << endl;
    else cout << "Sunny" << endl;

    return 0;
}


Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include <iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:6:5: error: 'string' was not declared in this scope
    6 |     string s; cin >> s;
      |     ^~~~~~
a.cc:6:15: error: 'cin' was not declared in this scope
    6 |     string s; cin >> s;
      |               ^~~
a.cc:6:22: error: 's' was not declared in this scope
    6 |     string s; cin >> s;
      |                      ^
a.cc:7:22: error: 'cout' was not declared in this scope
    7 |     if (s[0] == 'S') cout << "Cloudy" << endl;
      |                      ^~~~
a.cc:7:42: error: 'endl' was not declared in this scope
    7 |     if (s[0] == 'S') cout << "Cloudy" << endl;
      |                                          ^~~~
a.cc:8:27: error: 'cout' was not declared in this scope
    8 |     else if (s[0] == 'C') cout << "Rainy" << endl;
      |                           ^~~~
a.cc:8:46: error: 'endl' was not declared in this scope
    8 |     else if (s[0] == 'C') cout << "Rainy" << endl;
      |                                              ^~~~
a.cc:9:10: error: 'cout' was not declared in this scope
    9 |     else cout << "Sunny" << endl;
      |          ^~~~
a.cc:9:29: error: 'endl' was not declared in this scope
    9 |     else cout << "Sunny" << endl;
      |                             ^~~~
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 {
    cout << 'Sunny' << endl;
    }
  }
}
   

Compiler output:
a.cc:8:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    8 |   if (S == 'Sunny') {
      |            ^~~~~~~
a.cc:9:13: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    9 |     cout << 'Cloudy' << endl;
      |             ^~~~~~~~
a.cc:11:19: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   11 |     else if (S == 'Cloudy') {
      |                   ^~~~~~~~
a.cc:12:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   12 |     cout << 'Rainy' << endl;
      |             ^~~~~~~
a.cc:15:13: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   15 |     cout << 'Sunny' << endl;
      |             ^~~~~~~
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

String WeatherPrediction(String s) {
    switch(s){
        case "Sunny": return "Cloudy";
        case "Cloudy": return "Rainy";
        case "Rainy": return "Sunny";
    }
    return s;
}

int main(){
    string s;
    cin >> s;
	
  	WeatherPrediction(s);
    
  	cout << s << "\n";
    return 0;
}

Compiler output:
a.cc:5:1: error: 'String' does not name a type
    5 | String WeatherPrediction(String s) {
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:18:9: error: 'WeatherPrediction' was not declared in this scope
   18 |         WeatherPrediction(s);
      |         ^~~~~~~~~~~~~~~~~
Language: C++

#include <bits/stdc++.h>
#include <string>
using namespace std;
 
int main() {
  string wather;
  cin >> wather;
 
  // 以下のコメント/* */を消して追記する
  if (wather == "Sunny") {
    cout << "Cloudy" << endl;
  }
  
   if (wather == "Cloudy") {
    cout << "Rainy" << endl;
  }
  
   if (wather == "Rainy") {
    cout << "Sunny" << endl;
  }


Compiler output:
a.cc: In function 'int main()':
a.cc:20:4: error: expected '}' at end of input
   20 |   }
      |    ^
a.cc:5:12: note: to match this '{'
    5 | int main() {
      |            ^
Language: C

#include<stdio.h>
#include<string.h>
int main(void){
    char weather[20];

    scanf("%s",&weather);


    if(strcmp(weather,"Sunny")==0){
        printf("Cloudy");
    }if(strcmp(weather,"Cloudy")==0){
        printf("Rainy");
    }if(strcmp(weather,"Rainy")==0){
        printf("Sunny");
    }

    return 0;


Compiler output:
main.c: In function 'main':
main.c:17:5: error: expected declaration or statement at end of input
   17 |     return 0;
      |     ^~~~~~
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;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:7: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"Sunny"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    7 |   if(S="Sunny") cout<<"Cloudy"<<endl;
      |      ~^~~~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:8:7: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"Cloudy"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    8 |   if(S="Cloudy") cout<<"Rainy"<<endl;
      |      ~^~~~~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
a.cc:9:7: error: could not convert 'S.std::__cxx11::basic_string<char>::operator=(((const char*)"Rainy"))' from 'std::__cxx11::basic_string<char>' to 'bool'
    9 |   if(S="Rainy") cout<<"Sunny"<<endl;
      |      ~^~~~~~~~
      |       |
      |       std::__cxx11::basic_string<char>
Language: Java


import java.util.Scanner;
public class A {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		String S=scan.next();
		if(S=="Sunny"){
			System.out.print("Cloudy");
		}
		else if(S=="Cloudy"){
			System.out.print("Rainy");
			
		}
		else if(S=="Rainy"){
			System.out.print("Sunny");
		}

	}

}


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: C++

#include<iostream>
#include<vector>
#include<string>
using namespace std;
 
string weth[3] = ["Sunny", "Cloudy", "Rainy"];
 
int main(){
	string s;
	cin >> s;
	for(int i=0;i<3;i++){
		if (s == weth[i]){
			if(i == 2){
				cout << weth[0] << endl;
				break;
			}else{
				cout << weth[i+1] << endl;
				break;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:6:19: error: expected identifier before string constant
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"];
      |                   ^~~~~~~
a.cc:6:26: error: expected ']' before ',' token
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"];
      |                          ^
      |                          ]
a.cc: In lambda function:
a.cc:6:26: error: expected '{' before ',' token
a.cc: At global scope:
a.cc:6:18: error: array must be initialized with a brace-enclosed initializer
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"];
      |                  ^~~~~~~~
a.cc:6:28: error: expected unqualified-id before string constant
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"];
      |                            ^~~~~~~~
Language: C++

#include<bits/stdc++.h>
#include<string.h>

using namespace std;
int main()
{
    char a[1000];
    gets(a);
    if(strcmp(a,"Sunny")==0){
        cout<<"Cloudy"<<endl;
    }
    else if(strcmp(a,"Cloudy")==0){
        cout<<"Rainy"<<endl;
    }
   else if(strcmp(a,"Rainy")==0){
        cout<<"Sunny"<<endl;
    }
}



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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:9:11: error: unable to find string literal operator 'operator""l' with 'const char [7]', 'long unsigned int' arguments
    9 |     cout<<"Cloudy"l
      |           ^~~~~~~~~
Language: Java

public class Main {

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

}


Compiler output:
Main.java:4: error: cannot find symbol
        Scanner s = new Scanner(System.in);
        ^
  symbol:   class Scanner
  location: class Main
Main.java:4: error: cannot find symbol
        Scanner s = new Scanner(System.in);
                        ^
  symbol:   class Scanner
  location: class Main
2 errors
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 {
    cout << "Sunny" << endl;
    }
  }
}
   

Compiler output:
a.cc: In function 'int main()':
a.cc:8:9: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |   if (S == "Sunny") {
      |       ~~^~~~~~~~~~
a.cc:11:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     else if (S == "Cloudy") {
      |              ~~^~~~~~~~~~~
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: C++

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

int main(){
  string s;
  cin >> s;
  if(s[0] == 'S') cout << "Cloudy" << endl;
  if(s[0] == 'C') cout << "Rainy" << endl;
  if(s[0] == 'R') cout << "Sunny" << endl;
}

Compiler output:
a.cc:1:2: error: invalid preprocessing directive #including; did you mean #include?
    1 | #including <iostream>
      |  ^~~~~~~~~
      |  include
a.cc:2:2: error: invalid preprocessing directive #including; did you mean #include?
    2 | #including <string>
      |  ^~~~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:6:3: error: 'string' was not declared in this scope
    6 |   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 | #including <iostream>
a.cc:7:3: error: 'cin' was not declared in this scope
    7 |   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 | #including <iostream>
a.cc:7:10: error: 's' was not declared in this scope
    7 |   cin >> s;
      |          ^
a.cc:8:19: error: 'cout' was not declared in this scope
    8 |   if(s[0] == 'S') cout << "Cloudy" << endl;
      |                   ^~~~
a.cc:8:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:8:39: error: 'endl' was not declared in this scope
    8 |   if(s[0] == 'S') 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 | #including <iostream>
a.cc:9:19: error: 'cout' was not declared in this scope
    9 |   if(s[0] == 'C') cout << "Rainy" << endl;
      |                   ^~~~
a.cc:9:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:9:38: error: 'endl' was not declared in this scope
    9 |   if(s[0] == 'C') cout << "Rainy" << endl;
      |                                      ^~~~
a.cc:9:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:10:19: error: 'cout' was not declared in this scope
   10 |   if(s[0] == 'R') cout << "Sunny" << endl;
      |                   ^~~~
a.cc:10:19: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:10:38: error: 'endl' was not declared in this scope
   10 |   if(s[0] == 'R') cout << "Sunny" << endl;
      |                                      ^~~~
a.cc:10:38: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
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;
  }
}
  

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

#include<bits/stdc++.h>

using namespace std;
int main()
{
    char a[1000];
    gets(a);
    if(strcmp(a,"Sunny")==0){
        cout<<"Cloudy"<<endl;
    }
    else if(strcmp(a,"Cloudy")==0){
        cout<<"Rainy"<<endl;
    }
   else if(strcmp(a,"Rainy")==0){
        cout<<"Sunny"<<endl;
    }
}



Compiler output:
a.cc: In function 'int main()':
a.cc:7:5: error: 'gets' was not declared in this scope; did you mean 'getw'?
    7 |     gets(a);
      |     ^~~~
      |     getw
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:14:22: error: expected ';' before '{' token
   14 |   else (S == "Rainy") {
      |                      ^~
      |                      ;
a.cc:14: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]
   14 |   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<fstream>
#include<string>
#include<iostream>
#include<sstream>
#include<iterator>
#include<cmath>
#include<stdio.h>

using namespace std;

int main(){
 string txt;
 cin >> txt;
  if(txt.c_str()=='Sunny')cout << 'Cloudy' << endl;
  if(txt.c_str()=='Cloudy')cout << 'Rainy' << endl;
  if(txt.c_str()=='Rainy')cout << 'Sunny' << endl;
  return 0;
}

Compiler output:
a.cc:14:19: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   14 |   if(txt.c_str()=='Sunny')cout << 'Cloudy' << endl;
      |                   ^~~~~~~
a.cc:14:35: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   14 |   if(txt.c_str()=='Sunny')cout << 'Cloudy' << endl;
      |                                   ^~~~~~~~
a.cc:15:19: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
   15 |   if(txt.c_str()=='Cloudy')cout << 'Rainy' << endl;
      |                   ^~~~~~~~
a.cc:15:36: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   15 |   if(txt.c_str()=='Cloudy')cout << 'Rainy' << endl;
      |                                    ^~~~~~~
a.cc:16:19: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   16 |   if(txt.c_str()=='Rainy')cout << 'Sunny' << endl;
      |                   ^~~~~~~
a.cc:16:35: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
   16 |   if(txt.c_str()=='Rainy')cout << 'Sunny' << endl;
      |                                   ^~~~~~~
a.cc: In function 'int main()':
a.cc:14:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   14 |   if(txt.c_str()=='Sunny')cout << 'Cloudy' << endl;
      |      ~~~~~~~~~~~^~~~~~~~~
a.cc:15:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |   if(txt.c_str()=='Cloudy')cout << 'Rainy' << endl;
      |      ~~~~~~~~~~~^~~~~~~~~~
a.cc:16:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   16 |   if(txt.c_str()=='Rainy')cout << 'Sunny' << endl;
      |      ~~~~~~~~~~~^~~~~~~~~
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 {
    cout << "Sunny" << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:11: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
    8 |   if (S = "Sunny") {
      |           ^~~~~~~
      |           |
      |           const char*
a.cc:11:18: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   11 |     else if (S = "Cloudy") {
      |                  ^~~~~~~~
      |                  |
      |                  const char*
a.cc: At global scope:
a.cc:18:1: error: expected declaration before '}' token
   18 | }
      | ^
Language: Java

public static void main(String[] args){
String S;
  if(S.equals(Sunny)){
    System.out.println("Cloudy");
  }else if(S.equals(Cloudy)){
    System.out.println("Rainy");
  }
  else{
    System.out.println("Sunny");
  }
}
    

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: C

#include <stdio.h>

int main(){
  char s[10];
  scanf("%d", s);
  
  if(s[0]==S){
    printf("Cloudy");
  }
  else if(s[0]==C){
    printf("Rainy");
  }
  else if(s[0]==R){
    printf("Sunny");
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:7:12: error: 'S' undeclared (first use in this function)
    7 |   if(s[0]==S){
      |            ^
main.c:7:12: note: each undeclared identifier is reported only once for each function it appears in
main.c:10:17: error: 'C' undeclared (first use in this function)
   10 |   else if(s[0]==C){
      |                 ^
main.c:13:17: error: 'R' undeclared (first use in this function)
   13 |   else if(s[0]==R){
      |                 ^
Language: C++

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

	    String word = sc.next();
	    String result = "";
	    if (word.equals("Cloudy")) result = "Rainy";
	    if (word.equals("Rainy")) result = "Sunny";
	    if (word.equals("Sunny")) result = "Cloudy";

		System.out.println(result);

    }
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: expected unqualified-id before 'public'
    3 | public class Main {
      | ^~~~~~
Language: C++

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

string weth[3] = ["Sunny", "Cloudy", "Rainy"] 

int main(){
	string s;
	cin >> s;
	for(int i=0;i<3;i++){
		if (s == weth[i]){
			if(i == 2){
				cout << weth[0] << endl;
				break;
			}else{
				cout << weth[i+1] << endl;
				break;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:6:19: error: expected identifier before string constant
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"]
      |                   ^~~~~~~
a.cc:6:26: error: expected ']' before ',' token
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"]
      |                          ^
      |                          ]
a.cc: In lambda function:
a.cc:6:26: error: expected '{' before ',' token
a.cc: At global scope:
a.cc:6:18: error: array must be initialized with a brace-enclosed initializer
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"]
      |                  ^~~~~~~~
a.cc:6:28: error: expected unqualified-id before string constant
    6 | string weth[3] = ["Sunny", "Cloudy", "Rainy"]
      |                            ^~~~~~~~
Language: C++

#include<iostream>
#include<string>

using namespace std;

int main()
{
  string S;
  cin >> S;
  if(S[0] == 'S')
    cout << "Cloudy"<< endl;
  else if(S[0] == "C")
    cout << "Rainy" << endl;
  else
    cout << "Sunny" << endl;
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:16: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |   else if(S[0] == "C")