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

#include <iostream>
#include <string>
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;
  return 0;
}

Compiler output:
main.c:1:10: fatal error: iostream: No such file or directory
    1 | #include <iostream>
      |          ^~~~~~~~~~
compilation terminated.
Language: C

#include <stdio.h>

int main(void) {

	char S[112];

    scanf("%s",S);
  
    for(int i = 0;i < 112;++i){
      if((i - 1) % 2 = 0 && S[i - 1] == 'L'){
        puts("No");
        return 0;
      }
      else if((i - 1) % 2 = 1 && S[i - 1] == 'R'){
        puts("No");
        return 0;
      }
    }
  
  puts("Yes");
    
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:10:22: error: lvalue required as left operand of assignment
   10 |       if((i - 1) % 2 = 0 && S[i - 1] == 'L'){
      |                      ^
main.c:14:27: error: lvalue required as left operand of assignment
   14 |       else if((i - 1) % 2 = 1 && S[i - 1] == 'R'){
      |                           ^
Language: Java

import java.util.*;
public class MyClass {
    public static void main(String args[]) {
      Scanner read = new Scanner(System.in);
      String s = read.nextLine();
      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:2: error: class MyClass is public, should be declared in a file named MyClass.java
public class MyClass {
       ^
1 error
Language: Java

import javafx.beans.property.IntegerProperty;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception{
        BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
        String s = bf.readLine();
        String[] arr = {"Sunny", "Cloudy", "Rainy"};
        for(int i=0; i<arr.length; i++) {
            if(s.equals(arr[i])) {
                int printIdx = i+1;
                if(printIdx == 3) {
                    printIdx = 0;
                }
                System.out.println(arr[printIdx]);
                return;
            }
        }
    }



}

Compiler output:
Main.java:1: error: package javafx.beans.property does not exist
import javafx.beans.property.IntegerProperty;
                            ^
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:7: error: incompatible types: String cannot be converted to boolean
    if(S = "Sunny"){
         ^
Main.java:9: error: incompatible types: String cannot be converted to boolean
    }else if(S = "Cloudy"){
               ^
2 errors
Language: C++

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

int main(){

        string line;
        getline(cin,line);
        int a=1;

        for(int i=1;i<100&&line[i]!=0;i+=2){
               if(line[i]!='R'||line[i]!='U'||line[i]!='D'){
                       a=0;
               }


        for(int i=0;i<100&&line[i]!=0;i+=2){
               if(line[i]!='L'||line[i]!='U'||line[i]!='D'){
                       a=0;
               }

        if(a==1){
                cout<<"Yes";
        }else{
                cout<<"No";
        }
        return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:11:44: note: to match this '{'
   11 |         for(int i=1;i<100&&line[i]!=0;i+=2){
      |                                            ^
a.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:3: error: 'else' without a previous 'if'
   14 |   else{
      |   ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:12:3: error: 'else' without a previous 'if'
   12 |   else{
      |   ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <stack>
#include <istream>
#include <map>
#include <set>
#include <queue>
#define rep0(i,n) for (int i = 0; i < (n); ++i)  //0スタート
#define rep1(i,n) for (int i = 1; i < (n); ++i)  //1スタート
#define REP(i,a,b) for (int i = a; i < (b); ++i)  //aからbまで
#define P(x) cout<<x<<endl  //変数xを改行付きで出力
#define INF 1000000007  //最大値兼MOD
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
/*
./a.exe
*/
string s;
cin>>s;
if(s == "Sunny")P("Cloudy");
else if(s == "Rainy")P("Sunny")
else P("Rainy");
return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:32:1: error: expected ';' before 'else'
   32 | else P("Rainy");
      | ^~~~
Language: C++

#include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <algorithm>
#include <cmath>
#include <stack>
#include <istream>
#include <map>
#include <set>
#include <queue>
#define rep0(i,n) for (int i = 0; i < (n); ++i)  //0スタート
#define rep1(i,n) for (int i = 1; i < (n); ++i)  //1スタート
#define REP(i,a,b) for (int i = a; i < (b); ++i)  //aからbまで
#define P(x) cout<<x<<endl  //変数xを改行付きで出力
#define INF 1000000007  //最大値兼MOD
typedef long long ll;
using namespace std;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
/*
./a.exe
*/
string s;
cin>>s;
if(s == "Sunny")P("Cloudy");
else if(s == "Rainy")P("Sunny")
else P("Rainy")
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:1: error: expected ';' before 'else'
   32 | else P("Rainy")
      | ^~~~
Language: Java


public class renshu {

	public static void main(String[] args) {

		String weather = args[0];

		if(weather.equals("Sunny")) {
			System.out.println("Cloudy");
		}else if(weather.equals("Cloudy")) {
			System.out.println("Rainy");
		}else if(weather.equals("Rainy")) {
			System.out.println("Sunny");
		}else {
			System.out.println("Sunny or Cloudy or Rainy");
		}

	}

}

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

#include<cstdio>
#include<algorithm>
using namespace std;
int dp[101][4][4],box[101][4];
int main(void)
{
	int n,k,a,i,j,sum,K,b;
	scanf("%d %d %",&n,&K,&a);
	for(i=1;i<=n;i++){
		for(j=1;j<=3;j++){
			box[i][j]=0;
		}
	}
	for(i=1;i<=n;i++){
		for(j=1;j<=3;j++){
			for(k=1;k<=3;k++){
				dp[i][j][k]=0;
			}
		}
	}
	box[1][1]=1;
	box[1][2]=1;
	box[1][3]=1;
	for(i=0:i<K;i++){
		scanf("%d %d",&a,&b);
		for(j=1;j<=3;j++){
			if(j!=b){
				box[a][j]=-1;
			}
		}
	}
	cnt=0;
	for(i=1;i<=n;i++){
		for(j=1;j<=3;j++){
			if(box[i][j]>0){
				for(k=1;k<=3;k++){
					if(box[i+1][k]!=-1){
						dp[i+1][k][cnt]=j;
						if(dp[i+1][k][1]){
						box[i+1][k]+=box[i][j];
						}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: expected ';' before ':' token
   24 |         for(i=0:i<K;i++){
      |                ^
      |                ;
a.cc:24:24: error: expected ';' before ')' token
   24 |         for(i=0:i<K;i++){
      |                        ^
      |                        ;
a.cc:32:9: error: 'cnt' was not declared in this scope; did you mean 'int'?
   32 |         cnt=0;
      |         ^~~
      |         int
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:37:60: note: to match this '{'
   37 |                                         if(box[i+1][k]!=-1){
      |                                                            ^
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:36:50: note: to match this '{'
   36 |                                 for(k=1;k<=3;k++){
      |                                                  ^
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:35:40: note: to match this '{'
   35 |                         if(box[i][j]>0){
      |                                        ^
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:34:34: note: to match this '{'
   34 |                 for(j=1;j<=3;j++){
      |                                  ^
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:33:26: note: to match this '{'
   33 |         for(i=1;i<=n;i++){
      |                          ^
a.cc:41:50: error: expected '}' at end of input
   41 |                                                 }
      |                                                  ^
a.cc:6:1: note: to match this '{'
    6 | {
      | ^
Language: C++

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

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

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

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

#include<stdio.h>
#include<string.h>
int main(){
char c[10]="Sunny";
char d[10]="Cloudy";
 char e[10]="Rainy";
char f[10];
gets(f);
if(strcmp(f,c)==0){
  printf("Cloudy");
}
else if(strcmp(f,d)==0){
  printf("Rainy");
}
else if(strcmp(f,e)==0){
  printf("Sunny");
}



}


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

import java.util.*;

class Main{	
	public static void main(String[] args){
    
    	Map<String,String> tommorowWeatherMap = new HashMap<String, String>(){
        	{
            	put("Sunny", "Cloudy");
                put("Cloudy", "Rainy");
                put("Rainy", "Sunny");
            }
        };
    	Scanner sc = new Scanner(System.in);
        String todayWeather = sc.next();
        System.out.println(tommorowWeatherMap.get(todayWeather))
    }
}


Compiler output:
Main.java:15: error: ';' expected
        System.out.println(tommorowWeatherMap.get(todayWeather))
                                                                ^
1 error
Language: Java

import java.util.*;

class Main{	
	public static void main(String[] args){
    
    	Map<String,String> tommorowWeatherMap = new HashMap<String, String>(){
        	{
            	put("Sunny", "Cloudy");
                put("Cloudy", "Rainy");
                put("Rainy", "Sunny");
            }
        }
    	Scanner sc = new Scanner(System.in);
        String todayWeather = sc.next();
        System.out.println(tommorowWeatherMap.get(todayWeather))
    }
}


Compiler output:
Main.java:12: error: ';' expected
        }
         ^
Main.java:15: error: ';' expected
        System.out.println(tommorowWeatherMap.get(todayWeather))
                                                                ^
2 errors
Language: Java

import java.util.*

class Main{	
	public static void main(String[] args){
    
    	Map<String,String> tommorowWeatherMap = new HashMap<String, String>(){
        	{
            	put("Sunny", "Cloudy");
                put("Cloudy", "Rainy");
                put("Rainy", "Sunny");
            }
        }
    	Scanner sc = new Scanner(System.in);
        String todayWeather = sc.next();
        System.out.println(tommorowWeatherMap.get(todayWeather))
    }
}

Compiler output:
Main.java:1: error: ';' expected
import java.util.*
                  ^
Main.java:12: error: ';' expected
        }
         ^
Main.java:15: error: ';' expected
        System.out.println(tommorowWeatherMap.get(todayWeather))
                                                                ^
3 errors
Language: C

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

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

Compiler output:
main.c: In function 'main':
main.c:16:11: error: expected ';' before '}' token
   16 |   return 0
      |           ^
      |           ;
   17 | }
      | ~
Language: C++

    #include <iostream>
     
    string next(string in) {
    	if (in == "Sunny")
            return "Cloudy";
        else if (in == "Cloudy")
            return "Rainy";
        return "Sunny";
    }
     
    int main() {
      	string in;
      	std::cin >> in;
      	std::cout << next(in);
      	fflush(stdout);
    	return 0;
    }

Compiler output:
a.cc:3:5: error: 'string' does not name a type; did you mean 'stdin'?
    3 |     string next(string in) {
      |     ^~~~~~
      |     stdin
a.cc: In function 'int main()':
a.cc:12:9: error: 'string' was not declared in this scope
   12 |         string in;
      |         ^~~~~~
a.cc:12:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:13:21: error: 'in' was not declared in this scope; did you mean 'int'?
   13 |         std::cin >> in;
      |                     ^~
      |                     int
a.cc:14:22: error: 'next' was not declared in this scope; did you mean 'std::next'?
   14 |         std::cout << next(in);
      |                      ^~~~
      |                      std::next
In file included from /usr/include/c++/14/string:47:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: 'std::next' declared here
  232 |     next(_InputIterator __x, typename
      |     ^~~~
Language: C++

#include <iostream>

string next(string in) {
	if (in == "Sunny)
        return "Cloudy";
    else if (in == "Cloudy")
        return "Rainy";
    return "Sunny";
}

int main() {
  	string in;
  	std::cin >> in;
  	std::cout << next(in);
  	fflush(stdout);
	return 0;
}

Compiler output:
a.cc:4:19: warning: missing terminating " character
    4 |         if (in == "Sunny)
      |                   ^
a.cc:4:19: error: missing terminating " character
    4 |         if (in == "Sunny)
      |                   ^~~~~~~
a.cc:3:1: error: 'string' does not name a type; did you mean 'stdin'?
    3 | string next(string in) {
      | ^~~~~~
      | stdin
a.cc: In function 'int main()':
a.cc:12:9: error: 'string' was not declared in this scope
   12 |         string in;
      |         ^~~~~~
a.cc:12:9: note: suggested alternatives:
In file included from /usr/include/c++/14/iosfwd:41,
                 from /usr/include/c++/14/ios:40,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:1:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
In file included from /usr/include/c++/14/bits/locale_classes.h:40,
                 from /usr/include/c++/14/bits/ios_base.h:41,
                 from /usr/include/c++/14/ios:44:
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:13:21: error: 'in' was not declared in this scope; did you mean 'int'?
   13 |         std::cin >> in;
      |                     ^~
      |                     int
a.cc:14:22: error: 'next' was not declared in this scope; did you mean 'std::next'?
   14 |         std::cout << next(in);
      |                      ^~~~
      |                      std::next
In file included from /usr/include/c++/14/string:47:
/usr/include/c++/14/bits/stl_iterator_base_funcs.h:232:5: note: 'std::next' declared here
  232 |     next(_InputIterator __x, typename
      |     ^~~~
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:9:6: error: expected '(' before 'else'
    9 |   if else(s=="Cloudy")
      |      ^~~~
      |      (
a.cc:11:3: error: 'else' without a previous 'if'
   11 |   else(s=="Rainy")
      |   ^~~~
a.cc:11:19: error: expected ';' before 'cout'
   11 |   else(s=="Rainy")
      |                   ^
      |                   ;
   12 |     cout<<"Sunny"<<endl;
      |     ~~~~           
a.cc:11:9: 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>
2.#define ll long long
3.#define maxn (1000+10)
4.#define mod 10000003
5.#define lnode node*2,start,mid
6.#define rnode node*2+1,mid+1,end
7.using namespace std;
8.int main()
9.{ 
  string s;
  cin>>s;
  if(s=="Sunny")
    cout<<"Cloudy"<<endl;
  if else(s=="Cloudy")
    cout<<"Rainy"<<endl;
  else(s=="Rainy")
    cout<<"Sunny"<<endl;
}

Compiler output:
a.cc:2:3: error: stray '#' in program
    2 | 2.#define ll long long
      |   ^
a.cc:3:3: error: stray '#' in program
    3 | 3.#define maxn (1000+10)
      |   ^
a.cc:4:3: error: stray '#' in program
    4 | 4.#define mod 10000003
      |   ^
a.cc:5:3: error: stray '#' in program
    5 | 5.#define lnode node*2,start,mid
      |   ^
a.cc:6:3: error: stray '#' in program
    6 | 6.#define rnode node*2+1,mid+1,end
      |   ^
a.cc:2:1: error: expected unqualified-id before numeric constant
    2 | 2.#define ll long long
      | ^~
a.cc:8:1: error: expected unqualified-id before numeric constant
    8 | 8.int main()
      | ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main()
{
   string S;
   cin>>S;
   if(s=="Sunny"){
    cout<<"Cloudy";
   }
   if(s=="Cloudy"){
    cout<<"Rainy";
   }
   if(s=="Rainy"){
    cout<<"Sunny";
   }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:7: error: 's' was not declared in this scope
    8 |    if(s=="Sunny"){
      |       ^
a.cc:11:7: error: 's' was not declared in this scope
   11 |    if(s=="Cloudy"){
      |       ^
a.cc:14:7: error: 's' was not declared in this scope
   14 |    if(s=="Rainy"){
      |       ^
Language: C++

#include<iostream>
using namespace std;
int main () {
  string s;cin>>s;
  if (s[0]=='S') cout<<"Cloudy"<<endl;
  if (s[0]=='C') cout<<"Rainy"<<endl;
  else cout<<"Sunny"<<endl;

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: expected '}' at end of input
    7 |   else cout<<"Sunny"<<endl;
      |                            ^
a.cc:3:13: note: to match this '{'
    3 | int main () {
      |             ^
Language: C

#include<stdio.h>

int main(void)
{
  cher S[20];
  scanf("%s",&S);
  
  if(S[0] == 'S')
  {
    printf("Cloudy\n");
  }
  else if(S[0] == 'C')
  {
    printf("Rainy\n");
  }
  else if(S[0] == 'R')
  {
    printf("Sunny\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'cher'; did you mean 'char'?
    5 |   cher S[20];
      |   ^~~~
      |   char
Language: C

#include<stdio.h>

int main(void)
{
  cher S[20];
  scanf("%s",&S);
  
  if(S[0] == 'S')
  {
    printf("Cloudy\n");
  }
  if else(S[0] == 'C')
  {
    printf("Rainy\n");
  }
  if else(S[0] == 'R')
  {
    printf("Sunny\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'cher'; did you mean 'char'?
    5 |   cher S[20];
      |   ^~~~
      |   char
main.c:12:6: error: expected '(' before 'else'
   12 |   if else(S[0] == 'C')
      |      ^~~~
      |      (
Language: C

#include<stdio.h>

int main(void)
{
  cher S[20];
  scanf("%s",&S);
  
  if(S[0] == "S")
  {
    printf("Cloudy\n");
  }
  if else(S[0] == "C")
  {
    printf("Rainy\n");
  }
  if else(S[0] == "R")
  {
    printf("Sunny\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'cher'; did you mean 'char'?
    5 |   cher S[20];
      |   ^~~~
      |   char
main.c:8:11: warning: comparison between pointer and integer
    8 |   if(S[0] == "S")
      |           ^~
main.c:12:6: error: expected '(' before 'else'
   12 |   if else(S[0] == "C")
      |      ^~~~
      |      (
Language: C

#include<stdio.h>

int main(void)
{
  cher S[20];
  scanf("%s",&S);
  
  if(S == "S")
  {
    printf("Cloudy\n");
  }
  if else(S == "C")
  {
    printf("Rainy\n");
  }
  if else(S == "R")
  {
    printf("Sunny\n");
  }
  
  return 0;
}


Compiler output:
main.c: In function 'main':
main.c:5:3: error: unknown type name 'cher'; did you mean 'char'?
    5 |   cher S[20];
      |   ^~~~
      |   char
main.c:8:8: warning: comparison of distinct pointer types lacks a cast [-Wcompare-distinct-pointer-types]
    8 |   if(S == "S")
      |        ^~
main.c:12:6: error: expected '(' before 'else'
   12 |   if else(S == "C")
      |      ^~~~
      |      (
Language: Java

import java.util.Scanner;

public class NestedlfStatement1 {

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

		if(S.equals("Sunny")) {
			System.out.println("Coudy");
		}else if(S.equals("Cloudy")) {
			System.out.println("Rainy");
		}else {
			System.out.println("Sunny");
		}


	}

}


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

import java.util.Scanner;

public class NestedlfStatement1 {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
		Scanner sc=new Scanner(System.in);
		System.out.print("天気を入力:");
		String S=sc.nextLine();

		if(S.equals("Sunny")) {
			System.out.println("Coudy");
		}else if(S.equals("Cloudy")) {
			System.out.println("Rainy");
		}else {
			System.out.println("Sunny");
		}


	}

}

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

#include<stdio.h>

int main() {
  String a;
  
  scanf("%s", &a);
  
  if(a == "Sunny") {
    printf("Cloudy\n");
  } else if(a == "Cloudy") {
    printf("Rainy\n"); 
  } else if (a == "Rainy") {
    printf("Sunny\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'String'
    4 |   String a;
      |   ^~~~~~
main.c:8:8: warning: comparison between pointer and integer
    8 |   if(a == "Sunny") {
      |        ^~
main.c:10:15: warning: comparison between pointer and integer
   10 |   } else if(a == "Cloudy") {
      |               ^~
main.c:12:16: warning: comparison between pointer and integer
   12 |   } else if (a == "Rainy") {
      |                ^~
Language: C

#include<stdio.h>

int main(void)
{
  char s[10];
  
  if(s[0] == "S"){
    printf("Cloudy\n");
  } if else (s[0] == "C"){
    printf("Rainy\n");
  } if else (s[0] == "R"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:7:11: warning: comparison between pointer and integer
    7 |   if(s[0] == "S"){
      |           ^~
main.c:9:8: error: expected '(' before 'else'
    9 |   } if else (s[0] == "C"){
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:11: warning: comparison between pointer and integer
    8 |   if(s[0] == "S"){
      |           ^~
main.c:10:8: error: expected '(' before 'else'
   10 |   } if else (s[0] == "C"){
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void)
{
  char s[10];
  scanf("%s", s);
  
  if(s[0] == "Sunny"){
    printf("Cloudy\n");
  } if else (s[0] == "Cloudy"){
    printf("Rainy\n");
  } if else (s[0] == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:8:11: warning: comparison between pointer and integer
    8 |   if(s[0] == "Sunny"){
      |           ^~
main.c:10:8: error: expected '(' before 'else'
   10 |   } if else (s[0] == "Cloudy"){
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void)
{
  char s[10];
  scanf("%s", s);
  
  if(s == "Sunny"){
    printf("Cloudy\n");
  } if else (s == "Cloudy"){
    printf("Rainy\n");
  } if else (s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:10:8: error: expected '(' before 'else'
   10 |   } if else (s == "Cloudy"){
      |        ^~~~
      |        (
Language: C

#include<stdio.h>

int main(void){
  char s[10];
  scanf("%s", s);
 
  if(s == "Sunny"){
    printf("Cloudy\n");
  }if else(s == "Cloudy"){
    printf("Rainy\n");
  }if else(s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:9:7: error: expected '(' before 'else'
    9 |   }if else(s == "Cloudy"){
      |       ^~~~
      |       (
Language: C

#include<stdio.h>

int main(void){
  char s;
  
  if(s == "Sunny"){
    printf("Cloudy\n");
  }if else(s == "Cloudy"){
    printf("Rainy\n");
  }if else(s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:6:8: warning: comparison between pointer and integer
    6 |   if(s == "Sunny"){
      |        ^~
main.c:8:7: error: expected '(' before 'else'
    8 |   }if else(s == "Cloudy"){
      |       ^~~~
      |       (
Language: C

#include<stdio.h>

void main(void)
{
  char s;
  
  if(s == "Sunny"){
    printf("Cloudy\n");
  }if else(s == "Cloudy"){
    printf("Rainy\n");
  }if else(s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c: In function 'main':
main.c:7:8: warning: comparison between pointer and integer
    7 |   if(s == "Sunny"){
      |        ^~
main.c:9:7: error: expected '(' before 'else'
    9 |   }if else(s == "Cloudy"){
      |       ^~~~
      |       (
Language: C

include<stdio.h>
include<stdio.>

void main(void)
{
  char s;
  
  if(s == "Sunny"){
    printf("Cloudy\n");
  }if else(s == "Cloudy"){
    printf("Rainy\n");
  }if else(s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C

include<stdio.h>

void main(void)
{
  char s;
  
  if(s == "Sunny"){
    printf("Cloudy\n");
  }if else(s == "Cloudy"){
    printf("Rainy\n");
  }if else(s == "Rainy"){
    printf("Sunny\n");
  }
  return 0:
}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
    1 | include<stdio.h>
      |        ^
Language: C++

#include <iostream>
#include <algorithm>
#include <map>

using namespace std;

int main(int argc, char const *argv[]){
    string s;
    cin >> s;
    array<string,3> weather = {"Sunny", "Cloudy", "Rainy"};

    for (int i = 0; i < 3; i++)
    {
        if(s == weather[i]) {
            cout << weather[(i+1)%3] << endl;
            break;
        }
    }
    

    return 0;
}

Compiler output:
a.cc: In function 'int main(int, const char**)':
a.cc:10:21: error: variable 'std::array<std::__cxx11::basic_string<char>, 3> weather' has initializer but incomplete type
   10 |     array<string,3> weather = {"Sunny", "Cloudy", "Rainy"};
      |                     ^~~~~~~
a.cc:4:1: note: 'std::array' is defined in header '<array>'; this is probably fixable by adding '#include <array>'
    3 | #include <map>
  +++ |+#include <array>
    4 |
Language: Java

import java.util.Scanner;

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

  

Compiler output:
Main.java:7: error: not a statement
    System.out.println("Sunny") ? "Cloudy" : s.equals("Cloudy") ? "Rainy" : "Sunny");
                                ^
Main.java:7: error: ';' expected
    System.out.println("Sunny") ? "Cloudy" : s.equals("Cloudy") ? "Rainy" : "Sunny");
                                                                                   ^
2 errors
Language: C++

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <algorithm> // sort

#define REP(i, n) for (long long i = 0; i < (n); i++) 
typedef long long ll;
static const ll MOD = 1000000007;
static const ll INF = 1000000000000000000LL;
using namespace std;

string [4] temp = {"Sunny", "Cloudy", "Rainy", "Sunny"};

int main(){
    string S,res;
    cin >> S;


    REP(i,3)
    {
        if(S[i] == temp)res = S[i+1];

    }

    cout << res << endl;

    return 0;    
}



Compiler output:
a.cc:13:9: error: expected identifier before numeric constant
   13 | string [4] temp = {"Sunny", "Cloudy", "Rainy", "Sunny"};
      |         ^
a.cc:13:9: error: expected ']' before numeric constant
   13 | string [4] temp = {"Sunny", "Cloudy", "Rainy", "Sunny"};
      |         ^
      |         ]
a.cc:13:8: error: structured binding declaration cannot have type 'std::string' {aka 'std::__cxx11::basic_string<char>'}
   13 | string [4] temp = {"Sunny", "Cloudy", "Rainy", "Sunny"};
      |        ^
a.cc:13:8: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:13:8: error: empty structured binding declaration
a.cc:13:12: error: expected initializer before 'temp'
   13 | string [4] temp = {"Sunny", "Cloudy", "Rainy", "Sunny"};
      |            ^~~~
a.cc: In function 'int main()':
a.cc:22:20: error: 'temp' was not declared in this scope; did you mean 'tm'?
   22 |         if(S[i] == temp)res = S[i+1];
      |                    ^~~~
      |                    tm
Language: C++

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

int main()
{
  const char *weather[3] = { "Sunny", "Cloudy", "Rainy" };
  
  string S;
  int ans_index;
  
  cin >> S;
  
  for (int i = 0; i < 3; i++) {
    if (strcmp(weather[i], s.c_str()) == 0) {
  		ans_index = (i + 1) % 3;
      	break;
    }
  }
  
  cout << weather[ans_index] << endl;
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:28: error: 's' was not declared in this scope
   14 |     if (strcmp(weather[i], s.c_str()) == 0) {
      |                            ^
Language: C

#include<stdio.h>

int main() {
  String a;
  
  scanf("%s", a);
  
  if(a == "Sunny") {
    printf("Cloudy\n");
  } else if(a == "Cloudy") {
    printf("Rainy\n"); 
  } else if (a == "Rainy") {
    printf("Sunny\n");
  }
  
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:3: error: unknown type name 'String'
    4 |   String a;
      |   ^~~~~~
main.c:8:8: warning: comparison between pointer and integer
    8 |   if(a == "Sunny") {
      |        ^~
main.c:10:15: warning: comparison between pointer and integer
   10 |   } else if(a == "Cloudy") {
      |               ^~
main.c:12:16: warning: comparison between pointer and integer
   12 |   } else if (a == "Rainy") {
      |                ^~
Language: C++

#include<stdio.h>

int main() {
  String a;
  
  scanf("%s", &a);
  
  if(a == "Sunny") {
    printf("Cloudy\n");
  } else if(a == "Cloudy") {
    printf("Rainy\n"); 
  } else if (a == "Rainy") {
    printf("Sunny\n");
  }
  
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'String' was not declared in this scope
    4 |   String a;
      |   ^~~~~~
a.cc:6:16: error: 'a' was not declared in this scope
    6 |   scanf("%s", &a);
      |                ^
Language: C++

#include<stdio.h>

int main() {
  String a;
  
  scanf("%s", &a);
  
  if(a == "Sunny") {
    printf("Cloudy\n");
  } else if(a == "Cloudy") {
    printf("Rainy\n"); 
  } else if (a == "Rainy") {
    printf("Sunny\n");
  }
  
  return 0;
}
      

Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'String' was not declared in this scope
    4 |   String a;
      |   ^~~~~~
a.cc:6:16: error: 'a' was not declared in this scope
    6 |   scanf("%s", &a);
      |                ^
Language: C

#include<stdio.h>

int main(void)
{
	 char str[10];
	 scanf("%s", str);
        switch (str[]){
          case 'S':
          printf("Cloudy");
          break;
      
          case 'C':
            printf("Rainy");
            break;
        
          case 'R':
            printf("Sunny");
            break;
        }
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:21: error: expected expression before ']' token
    7 |         switch (str[]){
      |                     ^
Language: C

#include<stdio.h>

int main(void)
{
	 char str[10];
	 scanf("%s", str);
        switch (str){
          case 'S':
          printf("Cloudy");
          break;
      
          case 'C':
            printf("Rainy");
            break;
        
          case 'R':
            printf("Sunny");
            break;
        }
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: switch quantity not an integer
    7 |         switch (str){
      |                 ^~~
Language: C

#include<stdio.h>

int main(void)
{
	 char str[10];
	 scanf("%s", str);
        switch (){
          case 'S':
          printf("Cloudy");
          break;
      
          case 'C':
            printf("Rainy");
            break;
        
          case 'R':
            printf("Sunny");
            break;
        }
	
	return 0;
}


Compiler output:
main.c: In function 'main':
main.c:7:17: error: expected expression before ')' token
    7 |         switch (){
      |                 ^
Language: C++

#include <bits/stdc++.h>

int main()
{
    int n,k,q; cin >> n >> k >> q;
    int contestant[(int)pow(10,5)];
    for(int i = 0;i < q; i++)
    {
        int a; scanf("%d",&a);a--;
        contestant[a]++;
    }
    for(int i;i<q,i++)
    {
        if(q-contestant[i] < k){
            puts("Yes");
        }
        else
        {
            puts("No")
        }
        
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     int n,k,q; cin >> n >> k >> q;
      |                ^~~
      |                std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:12:22: error: expected ';' before ')' token
   12 |     for(int i;i<q,i++)
      |                      ^
      |                      ;
a.cc:19:23: error: expected ';' before '}' token
   19 |             puts("No")
      |                       ^
      |                       ;
   20 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>

int main()
{
    int n,k,q; cin >> n >> k >> q;
    int contestant[(int)pow(10,5)]
    for(int i = 0;i < q; i++)
    {
        int a; scanf("%d",&a);a--;
        contestant[a]++;
    }
    for(int i;i<q,i++)
    {
        if(q-contestant[i] < k){
            puts("Yes");
        }
        else
        {
            puts("No")
        }
        
    }
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:16: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |     int n,k,q; cin >> n >> k >> q;
      |                ^~~
      |                std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146,
                 from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:7:5: error: expected initializer before 'for'
    7 |     for(int i = 0;i < q; i++)
      |     ^~~
a.cc:7:19: error: 'i' was not declared in this scope
    7 |     for(int i = 0;i < q; i++)
      |                   ^
a.cc:12:22: error: expected ';' before ')' token
   12 |     for(int i;i<q,i++)
      |                      ^
      |                      ;
a.cc:14:14: error: 'contestant' was not declared in this scope
   14 |         if(q-contestant[i] < k){
      |              ^~~~~~~~~~
a.cc:19:23: error: expected ';' before '}' token
   19 |             puts("No")
      |                       ^
      |                       ;
   20 |         }
      |         ~
Language: C++

#include<iostream>
#include<string>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
  string s;
  cin>>s;
  int n=s.length();
  bool ans=true;
  rep(i,n){
    if(i%2==0){
      if(s[i]=='R'){
        cout<<"No"<<endl;
      }
    }else{
      if(s[i]=='L'){
        cout<<"No"<<endl;
      }
    }
    cout<<"Yes"<<endl;
  }
  

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

# include <bits/stdc++.h>

using namespace std;

int main()
{
    char S; cin >> S;
    map<char, string> mp;
    mp['S'] = "Cloudy";
    mp['C'] = "Rainy";
    mp['R'] = "Sunny";
  
    cout << mp[S[0]] << endl;

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:17: error: invalid types 'char[int]' for array subscript
   13 |     cout << mp[S[0]] << endl;
      |                 ^
Language: Java

import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    String answer ="";
    if(S.equals("Sunny")){
      answer = "Cloudy";
    }else if(S.equals("Cloudy")){
      answer = "Rainy";
    }else{
      answer = "Sunny";
    }
  }
  System.out.println(answer);
             
             
    
  }
  
  //最大公約数・最小公倍数（セットで使う）
static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
static int lcm (int a, int b) {return a*b/gcd(a,b);}


//素数判定
static boolean isPrime (int n) {
	if (n==2) return true;
	if (n<2 || n%2==0) return false;
	double d = Math.sqrt(n);
	for (int i=3; i<=d; i+=2) if(n%i==0){return false;}
	return true;
}


//倍数判定（10進数以外のときに有用）
static boolean isMultiple (String s, int base, int m) {
	int temp = 0;
	for (int i=0; i<s.length(); i++) {
		temp = (temp*base+Character.getNumericValue(s.charAt(i)))%m;
	}
	if (temp==0) {return true;}
	return false;
}


//階乗
static long factorial (int i) {
	if (i==1) {return 1;}
	else {return i*factorial(i-1);}
}


//進数変換
static String toNbase (String sm, int m, int n) {
	return Long.toString(Long.parseLong(sm,m),n);
}
  
}

Compiler output:
Main.java:15: error: <identifier> expected
  System.out.println(answer);
                    ^
Main.java:15: error: <identifier> expected
  System.out.println(answer);
                           ^
Main.java:22: error: unnamed classes are a preview feature and are disabled by default.
static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
       ^
  (use --enable-preview to enable unnamed classes)
Main.java:59: error: class, interface, enum, or record expected
}
^
4 errors
Language: C

#include<stdio.h>
#include <conio.h>

int main(void)
{
	 char str[10];
	 scanf("%s", str);
        switch (str[0]){
          case 'S':
          printf("Cloudy");
          break;
      
          case 'C':
            printf("Rainy");
            break;
        
          case 'R':
            printf("Sunny");
            break;
      
          default:
            printf("X");
            break;
        }
	
	return(0);
}

Compiler output:
main.c:2:10: fatal error: conio.h: No such file or directory
    2 | #include <conio.h>
      |          ^~~~~~~~~
compilation terminated.
Language: C

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

      

Compiler output:
main.c: In function 'main':
main.c:6:8: error: 'Sunny' undeclared (first use in this function)
    6 |   if(s=Sunny)
      |        ^~~~~
main.c:6:8: note: each undeclared identifier is reported only once for each function it appears in
main.c:8:14: error: 'Cloudy' undeclared (first use in this function)
    8 |    else if(s=Cloudy)
      |              ^~~~~~
main.c:10:15: error: 'Rainy' undeclared (first use in this function)
   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();
    
    String[] Weather = {"Sunny","Cloudy","Rainy"};
    
    for(int i = 0, i < 3 , i++) {
      if(weather[i].equals(s)){
        if(i < 2 ){
          System.out.println(Weather[i + 1]);
        }else{
          System.out.println(Weather[0]);
        }
      }
    }
  }
}




Compiler output:
Main.java:10: error: ';' expected
    for(int i = 0, i < 3 , i++) {
                    ^
Main.java:10: error: illegal start of type
    for(int i = 0, i < 3 , i++) {
                       ^
2 errors
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:6:13: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    6 |   if(strcmp(a,"Sunny")=0){
      |             ^
      |             |
      |             char
In file included from main.c:2:
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:6:23: error: lvalue required as left operand of assignment
    6 |   if(strcmp(a,"Sunny")=0){
      |                       ^
main.c:8:19: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    8 |   }else if(strcmp(a,"Cloudy")=0){
      |                   ^
      |                   |
      |                   char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:8:30: error: lvalue required as left operand of assignment
    8 |   }else if(strcmp(a,"Cloudy")=0){
      |                              ^
main.c:10:19: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
   10 |   }else if(strcmp(a,"Rainy")=0){
      |                   ^
      |                   |
      |                   char
/usr/include/string.h:156:32: note: expected 'const char *' but argument is of type 'char'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
main.c:10:29: error: lvalue required as left operand of assignment
   10 |   }else if(strcmp(a,"Rainy")=0){
      |                             ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:6: error: implicit declaration of function 'strcmp' [-Wimplicit-function-declaration]
    5 |   if(strcmp(a,"Sunny")=0){
      |      ^~~~~~
main.c:2:1: note: include '<string.h>' or provide a declaration of 'strcmp'
    1 | #include<stdio.h>
  +++ |+#include <string.h>
    2 | int main(){
main.c:5:13: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    5 |   if(strcmp(a,"Sunny")=0){
      |             ^
      |             |
      |             char
main.c:5:13: note: expected 'const char *' but argument is of type 'char'
main.c:5:23: error: lvalue required as left operand of assignment
    5 |   if(strcmp(a,"Sunny")=0){
      |                       ^
main.c:7:19: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    7 |   }else if(strcmp(a,"Cloudy")=0){
      |                   ^
      |                   |
      |                   char
main.c:7:19: note: expected 'const char *' but argument is of type 'char'
main.c:7:30: error: lvalue required as left operand of assignment
    7 |   }else if(strcmp(a,"Cloudy")=0){
      |                              ^
main.c:9:19: error: passing argument 1 of 'strcmp' makes pointer from integer without a cast [-Wint-conversion]
    9 |   }else if(strcmp(a,"Rainy")=0){
      |                   ^
      |                   |
      |                   char
main.c:9:19: note: expected 'const char *' but argument is of type 'char'
main.c:9:29: error: lvalue required as left operand of assignment
    9 |   }else if(strcmp(a,"Rainy")=0){
      |                             ^