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

#include<iostream>
using namespace std;

int main{
	int S=[Sunny,Cloudy,Rainy];
  	int weather,w;
	
    cout<<"明日の天気を予測してください。";
  	cin>>weather;
  
  	if (weather==S[0])
      cout<<S[1];
    else if (weather==S[1])
      cout<<S[2]
    else 
      cout<<S[0]
      
    return 0;
}

Compiler output:
a.cc:4:5: error: cannot declare '::main' to be a global variable
    4 | int main{
      |     ^~~~
a.cc:5:9: error: expected primary-expression before 'int'
    5 |         int S=[Sunny,Cloudy,Rainy];
      |         ^~~
a.cc:5:9: error: expected '}' before 'int'
a.cc:4:9: note: to match this '{'
    4 | int main{
      |         ^
a.cc:8:5: error: 'cout' does not name a type
    8 |     cout<<"明日の天気を予測してください。";
      |     ^~~~
a.cc:9:9: error: 'cin' does not name a type
    9 |         cin>>weather;
      |         ^~~
a.cc:11:9: error: expected unqualified-id before 'if'
   11 |         if (weather==S[0])
      |         ^~
a.cc:13:5: error: expected unqualified-id before 'else'
   13 |     else if (weather==S[1])
      |     ^~~~
a.cc:19:1: error: expected declaration before '}' token
   19 | }
      | ^
Language: C++

#include<iostream>
#include<bitsstdc++>
#include<vector>

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

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

#include<iostream>
#include<bitsstdc+>
#include<vector>

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

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

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

int main(){

  string today;
  cin >> today;
  switch (today) {
    case "Sunny":
    cout << "Cloudy" << endl;
    break;
    case "Cloudy":
    cout << "Rainy" << endl;
    break;
    case "Rainy":
    cout << "Sunny" << endl;
  }

  return 0;
}


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

#include <iostream>
#include <map>
#include <string>
using namespace std;
int main(){
    map<string,int> mp;
    map<int,string> mp2;
    mp["Sunny"] = 0;
    mp["Cloudy"] = 1;
    mp["Rainy"] = 2;
    mp2[0] = "Sunny";
    mp2[1] = "Cloudy";
    mp2[2] = "Rainy";
    string s;
    cin >> s;
    cout << mp[(mp2[s]+1)%3] << endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:20: error: no match for 'operator[]' (operand types are 'std::map<int, std::__cxx11::basic_string<char> >' and 'std::string' {aka 'std::__cxx11::basic_string<char>'})
   16 |     cout << mp[(mp2[s]+1)%3] << endl;
      |                    ^
In file included from /usr/include/c++/14/map:63,
                 from a.cc:2:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = int; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; mapped_type = std::__cxx11::basic_string<char>; key_type = int]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const std::map<int, std::__cxx11::basic_string<char> >::key_type&' {aka 'const int&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = int; _Tp = std::__cxx11::basic_string<char>; _Compare = std::less<int>; _Alloc = std::allocator<std::pair<const int, std::__cxx11::basic_string<char> > >; mapped_type = std::__cxx11::basic_string<char>; key_type = int]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'std::map<int, std::__cxx11::basic_string<char> >::key_type&&' {aka 'int&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C++

#include <iostream>
using namespace std;

int main(void){
    string weather;
    cin >> weather;

    if(weather[0]=="S") cout << "Cloudy";
    else if(weather[0]=="C") cout << "Rainy";
    else if(weather[0]=="R") cout << "Sunny";
    
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     if(weather[0]=="S") cout << "Cloudy";
a.cc:9:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     else if(weather[0]=="C") cout << "Rainy";
a.cc:10:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     else if(weather[0]=="R") cout << "Sunny";
Language: C++

S=input()
print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
  

Compiler output:
a.cc:2:7: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
      |       ^~~~~~~
a.cc:2:21: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
      |                     ^~~~~~~
a.cc:2:34: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
      |                                  ^~~~~~~
a.cc:2:48: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    2 | print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
      |                                                ^~~~~~~~
a.cc:2:62: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    2 | print('Sunny' if S=='Rainy' else 'Rainy' if S=='Cloudy' else 'Cloudy')
      |                                                              ^~~~~~~~
a.cc:1:1: error: 'S' does not name a type
    1 | S=input()
      | ^
Language: C++

#include <bits/stdc++.h>
int main(){
  string s;
  string weather[4];
  weather[0] = "Sunny";
  weather[1] = "Cloudy";
  weather[2] = "Rainy";
  weather[3] = weather[0];
  cin >> s;
  for(int i = 0; i < 4; i++){
    if(s == weather[i]){
      cout << weather[i+1] << endl;
      continue;
    }
  }
  return 0;
}
  
    
  
  

Compiler output:
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 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/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:9: error: expected ';' before 'weather'
    4 |   string weather[4];
      |         ^~~~~~~~
      |         ;
a.cc:5:3: error: 'weather' was not declared in this scope
    5 |   weather[0] = "Sunny";
      |   ^~~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |   cin >> s;
      |          ^
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       cout << weather[i+1] << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |       cout << weather[i+1] << endl;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

#include <bits/stdc++.h>
int main(){
  string s;
  string weather[4];
  weather[0] = 'Sunny';
  weather[1] = 'Cloudy';
  weather[2] = 'Rainy';
  weather[3] = weather[0];
  cin >> s;
  for(int i = 0; i < 4; i++){
    if(s == weather[i]){
      cout << weather[i+1] << endl;
      continue;
    }
  }
  return 0;
}
  
    
  
  

Compiler output:
a.cc:5:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   weather[0] = 'Sunny';
      |                ^~~~~~~
a.cc:6:16: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   weather[1] = 'Cloudy';
      |                ^~~~~~~~
a.cc:7:16: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   weather[2] = 'Rainy';
      |                ^~~~~~~
a.cc: In function 'int main()':
a.cc:3:3: error: 'string' was not declared in this scope
    3 |   string s;
      |   ^~~~~~
a.cc:3:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 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/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:4:9: error: expected ';' before 'weather'
    4 |   string weather[4];
      |         ^~~~~~~~
      |         ;
a.cc:5:3: error: 'weather' was not declared in this scope
    5 |   weather[0] = 'Sunny';
      |   ^~~~~~~
a.cc:9:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    9 |   cin >> s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:9:10: error: 's' was not declared in this scope
    9 |   cin >> s;
      |          ^
a.cc:12:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   12 |       cout << weather[i+1] << endl;
      |       ^~~~
      |       std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:12:31: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   12 |       cout << weather[i+1] << endl;
      |                               ^~~~
      |                               std::endl
In file included from /usr/include/c++/14/istream:41,
                 from /usr/include/c++/14/sstream:40,
                 from /usr/include/c++/14/complex:45,
                 from /usr/include/c++/14/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:127:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: Java

 import java.io.InputStreamReader;
 import java.io.IOException;
 import java.io.BufferedReader;
 import java.io.InputStream;

 public class Main{
  public enum whether{                          //天気を列挙
          Sunny,
          Cloudy,
          Rainy
  }
  public static void main(String[]args){
     InputStreamReader isr=new InputStreamReader(System.in);
     BufferedReader br=new BufferedReader(isr);    
          String whether=null;
     try{
          whether=br.readLine();
          br.close();
     }catch(IOException e){
          e.printStackTrace();
     }
     //天気を出力
     switch(whether){
       case Sunny:
          System.out.println("Cloudy");          //SunnyのときCloudyと表示
          break;
       case Cloudy:
          System.out.println("Rainy");           //CloudyのときRainyと表示
          break; 
       case Rainy:
          System.out.println("Sunny");           //RainyのときSunnyと表示
          break;
     }
   }
  }
       
      
    

Compiler output:
Main.java:24: error: cannot find symbol
       case Sunny:
            ^
  symbol:   variable Sunny
  location: class Main
Main.java:27: error: cannot find symbol
       case Cloudy:
            ^
  symbol:   variable Cloudy
  location: class Main
Main.java:30: error: cannot find symbol
       case Rainy:
            ^
  symbol:   variable Rainy
  location: class Main
3 errors
Language: C++

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

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

Compiler output:
a.cc:17:3: error: expected unqualified-id before 'for'
   17 |   for(int i=1;i<=n;i++){
      |   ^~~
a.cc:17:15: error: 'i' does not name a type
   17 |   for(int i=1;i<=n;i++){
      |               ^
a.cc:17:20: error: 'i' does not name a type
   17 |   for(int i=1;i<=n;i++){
      |                    ^
a.cc:22:3: error: expected unqualified-id before 'return'
   22 |   return 0;
      |   ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

wtoi = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
itow = {0:'Cloudy', 1:'Rainy', 2:'Sunny'}

s = input()
print(itow[wtoi[s]])

Compiler output:
a.cc:1:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | wtoi = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
      |         ^~~~~~~
a.cc:1:20: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    1 | wtoi = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
      |                    ^~~~~~~~
a.cc:1:32: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    1 | wtoi = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
      |                                ^~~~~~~
a.cc:2:11: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    2 | itow = {0:'Cloudy', 1:'Rainy', 2:'Sunny'}
      |           ^~~~~~~~
a.cc:2:23: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | itow = {0:'Cloudy', 1:'Rainy', 2:'Sunny'}
      |                       ^~~~~~~
a.cc:2:34: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    2 | itow = {0:'Cloudy', 1:'Rainy', 2:'Sunny'}
      |                                  ^~~~~~~
a.cc:1:1: error: 'wtoi' does not name a type
    1 | wtoi = {'Sunny':0, 'Cloudy':1, 'Rainy':2}
      | ^~~~
a.cc:2:1: error: 'itow' does not name a type
    2 | itow = {0:'Cloudy', 1:'Rainy', 2:'Sunny'}
      | ^~~~
a.cc:4:1: error: 's' does not name a type
    4 | s = input()
      | ^
Language: Java

import java.util.*;

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

Compiler output:
Main.java:9: error: cannot find symbol
        out = Cloudy;
              ^
  symbol:   variable Cloudy
  location: class Main
Main.java:11: error: cannot find symbol
        out = Rainy;
              ^
  symbol:   variable Rainy
  location: class Main
Main.java:13: error: cannot find symbol
        out = Sunny;
              ^
  symbol:   variable Sunny
  location: class Main
3 errors
Language: C++

#include<stdio.h>
#include<iostream>
#include<math.h>
#include<algorithm>
using namespace std;
using namespace std;
int main()
{
    string a;
    cin>>a;
    if(a=="Sunny")
        printf("Cloudy\n");
    else if(a=="Rainy")
        printf("Sunny\n");
    else if(a=="Cloudy")
        printf("Rainy\n")
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:26: error: expected ';' before 'return'
   16 |         printf("Rainy\n")
      |                          ^
      |                          ;
   17 |     return 0;
      |     ~~~~~~
Language: C

#include<stdio.h>
#include<iostream>

using namespace std;
int main()
{
	char s[10];
	cin>>s;
	if(s[0]=='S')
	{ printf("Cloudy\n");
    
	}
    else if(s[0]=='C')
	{printf("Rainy\n");
    
	}
    else 
    {printf("Sunny\n");
    
	}
return 0;
}

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

#include<stdio.h>
#include<string.h>
int main()
{
    char str[10];
    gets(str);
    if(str[0]=='S')
        printf("Cloudy\n");
    else if(str[0]=='C')
        printf("Rainy\n");
    else
        printf("Sunny\n");
}


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

#include<stdio.h>
int main(){
    char a[]={"Sunny"},b[]={"Cloudy"},c[]={"Rainy"};
    char x[10];
    gets(x);
    if(x[0]=='S')printf("%s\n",b);
    if(x[0]=='C')printf("%s\n",c);
    if(x[0]=='R')printf("%s\n",a);
    return 0;
}


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

#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<stack>
using namespace std;
#define ll long long
#define mod 1000000007
int main()
{
    char str[50];
    while(gets(str)!=NULL)
    {
        if(strcmp(str,"Sunny")==0) printf("Cloudy\n");
        else if(strcmp(str,"Cloudy")==0) printf("Rainy\n");
        else printf("Sunny\n");
    }
    return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'gets' was not declared in this scope; did you mean 'getw'?
   13 |     while(gets(str)!=NULL)
      |           ^~~~
      |           getw
Language: C++

#include<stdio.h>
int main()
{
    char a[10];
    gets(a);
    if(a[0]=='S')
        printf("Cloudy\n");
    if(a[0]=='C')
        printf("Rainy\n");
    if(a[0]=='R')
        printf("Sunny\n");
    return 0;
}


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

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


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

#include <iostream>
#include <cstdio>
#include <algorithm>
#include <cstring>
#include<stdlib.h>
#include<cmath>
#include<list>
#define ll long long int
#define lll unsigned long long
using namespace std;
int main()
{char c[20];
gets(c);
if(strcmp(c,"Sunny")==0)
{
    printf("Cloudy\n");
}
else if(strcmp(c,"Rainy")==0)
{
    printf("Sunny\n");
}
else
{
    printf("Rainy\n");
}
return 0;
}


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

#include<stdio.h>
#include<algorithm>
#include<string.h>
using namespace std;
char wea[][10]={"Sunny","Cloudy","Rainy"};
int main()
{
    char a[10];
    gets(a);
    for(int i=0;i<3;i++)
    {
        if(strcmp(a,wea[i])==0){
            printf("%s\n",wea[(i+1)%3]);
            break;}
    }
    return 0;
}


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

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

int main(){

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


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

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

using namespace std;

int main()
{
    char S[10];

    while(gets(S))
    {
        if(strcmp(S, "Sunny") == 0)
        {
            cout << "Cloudy" << endl;
        }

        else if(strcmp(S, "Cloudy") == 0)
        {
            cout << "Rainy" << endl;
        }

        else
        {
            cout << "Sunny" << endl;
        }
    }

    return 0;
}


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

#include <bits/stdc++>

using namespace std;

string s;
string ans;

int main() {
  ios::sync_with_stdio(0);
  cin >> s;
  if (s == "Sunny") {
    ans = "Cloudy";
  } else if (s == "Cloudy") {
    ans = "Rainy";
  } else {
    ans = "Sunny";
  }
  cout << ans << endl;
  return 0;
}
    

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

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
int main(){
  string s,t[3]={"Sunny","Cloudy",Rainy"};
  cin>>s;
  for(int i=0;i<3;i++){
    if(s==t[i]){
      cout<<t[(i+1)%3];
    }
  }
}

Compiler output:
a.cc:7:40: warning: missing terminating " character
    7 |   string s,t[3]={"Sunny","Cloudy",Rainy"};
      |                                        ^
a.cc:7:40: error: missing terminating " character
    7 |   string s,t[3]={"Sunny","Cloudy",Rainy"};
      |                                        ^~~
a.cc: In function 'int main()':
a.cc:7:35: error: 'Rainy' was not declared in this scope
    7 |   string s,t[3]={"Sunny","Cloudy",Rainy"};
      |                                   ^~~~~
a.cc:8:3: error: expected '}' before 'cin'
    8 |   cin>>s;
      |   ^~~
a.cc:7:17: note: to match this '{'
    7 |   string s,t[3]={"Sunny","Cloudy",Rainy"};
      |                 ^
a.cc:8:3: error: expected ',' or ';' before 'cin'
    8 |   cin>>s;
      |   ^~~
Language: C++

#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
#define M 1000000007
int main(){
  string s,t[3]={"Sunny",Cloudy",Rainy"};
  cin>>s;
  for(int i=0;i<3;i++){
    if(s==t[i]){
      cout<<t[(i+1)%3];
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:26: error: 'Cloudy' was not declared in this scope
    7 |   string s,t[3]={"Sunny",Cloudy",Rainy"};
      |                          ^~~~~~
a.cc:7:32: error: expected '}' before string constant
    7 |   string s,t[3]={"Sunny",Cloudy",Rainy"};
      |                 ~              ^~~~~~~~
a.cc:7:32: error: expected ',' or ';' before string constant
a.cc: At global scope:
a.cc:8:3: error: 'cin' does not name a type
    8 |   cin>>s;
      |   ^~~
a.cc:9:3: error: expected unqualified-id before 'for'
    9 |   for(int i=0;i<3;i++){
      |   ^~~
a.cc:9:15: error: 'i' does not name a type
    9 |   for(int i=0;i<3;i++){
      |               ^
a.cc:9:19: error: 'i' does not name a type
    9 |   for(int i=0;i<3;i++){
      |                   ^
a.cc:14:1: error: expected declaration before '}' token
   14 | }
      | ^
Language: Java

import java.util.*;
 
class Main{
  public static void main(String[] args){
    Scanner scanner=new Scanner(System.in);
    String weather=scanner.next();
    if(weather.equals("Sunny")){
      System.out.println("Cloudy");
    } if(weather.equals("Cloudy")){
      System.out.println("Rainy");
    } if(weather.ewuals("Rainy")){
      System.out.println("Sunny");
    }
  }
}

Compiler output:
Main.java:11: error: cannot find symbol
    } if(weather.ewuals("Rainy")){
                ^
  symbol:   method ewuals(String)
  location: variable weather of type String
1 error
Language: Java

import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
  public static void main(String[]args){
    InputStreamReader isr=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(isr);
    String str=null;
      str=br.readLine();
    if(str.equals("Sunny")){
      System.out.println("Cloudy");
    }
    if(str.equals("Cloudy")){
      System.out.println("Rainy");
    }
    if(str.equals("Rainy")){
      System.out.println("Sunny");
    }
  }
  }
       
      
    

Compiler output:
Main.java:9: error: unreported exception IOException; must be caught or declared to be thrown
      str=br.readLine();
                     ^
1 error
Language: Java

import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
  public static void main(String[]args){
    InputStreamReader isr=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(isr);
    String str=null;
      str=br.readLine;
    if(str.equals("Sunny")){
      System.out.println("Cloudy");
    }
    if(str.equals("Cloudy")){
      System.out.println("Rainy");
    }
    if(str.equals("Rainy")){
      System.out.println("Sunny");
    }
  }
  }
       
      
    

Compiler output:
Main.java:9: error: cannot find symbol
      str=br.readLine;
            ^
  symbol:   variable readLine
  location: variable br of type BufferedReader
1 error
Language: Java

import java.io.InputStreamReader;
import java.io.BufferedReader;

public class Main{
  public static void main(String[]args){
    InputStreamReader isr=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(isr);
    String str=br.readLine();
    if(str.equals("Sunny")){
      System.out.println("Cloudy");
    }
    if(str.equals("Cloudy")){
      System.out.println("Rainy");
    }
    if(str.equals("Rainy")){
      System.out.println("Sunny");
    }
  }
  }
       
      
    

Compiler output:
Main.java:8: error: unreported exception IOException; must be caught or declared to be thrown
    String str=br.readLine();
                          ^
1 error
Language: Java

import java.util.InputStreamReader;
import java.util.BufferedReader;

public class Main{
  public static void main(String[]args){
    InputStreamReader isr=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(isr);
    String str=br.readLine();
    if(str.equals("Sunny")){
      System.out.println("Cloudy");
    }
    if(str.equals("Cloudy")){
      System.out.println("Rainy");
    }
    if(str.equals("Rainy")){
      System.out.println("Sunny");
    }
  }
  }
       
      
    

Compiler output:
Main.java:1: error: cannot find symbol
import java.util.InputStreamReader;
                ^
  symbol:   class InputStreamReader
  location: package java.util
Main.java:2: error: cannot find symbol
import java.util.BufferedReader;
                ^
  symbol:   class BufferedReader
  location: package java.util
Main.java:6: error: cannot find symbol
    InputStreamReader isr=new InputStreamReader(System.in);
    ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:6: error: cannot find symbol
    InputStreamReader isr=new InputStreamReader(System.in);
                              ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:7: error: cannot find symbol
    BufferedReader br=new BufferedReader(isr);
    ^
  symbol:   class BufferedReader
  location: class Main
Main.java:7: error: cannot find symbol
    BufferedReader br=new BufferedReader(isr);
                          ^
  symbol:   class BufferedReader
  location: class Main
6 errors
Language: Java

import java.util.InputStreamReader;
import java.util.BufferedReader;

public class Main{
  public static void main(String[]args){
    InputStreamReader isr=new InputStreamReader(System.in);
    BufferedReader br=new BufferedReader(isr);
    String str=br.readLine();
    if(str.equals("Sunny"){
      System.out.println("Cloudy");
    }
    if(str.equals("Cloudy"){
      System.out.println("Rainy");
    }
    if(str.equals("Rainy"){
      System.out.println("Sunny");
    }
  }
  }
       
      
    

Compiler output:
Main.java:9: error: ')' expected
    if(str.equals("Sunny"){
                          ^
Main.java:12: error: ')' expected
    if(str.equals("Cloudy"){
                           ^
Main.java:15: error: ')' expected
    if(str.equals("Rainy"){
                          ^
3 errors
Language: Java

import java.util.*;

class Main{
  public static void main(String[] args){
    Scanner scanner=new Scanner(System.in);
    String weather=scanner.nextInt();
    if(weather=="Sunny"){
      System.out.println("Cloudy");
    }else if(weather=="Cloudy"){
      System.out.println("Rainy");
    }else if(weather=="Rainy"){
      System.out.println("Sunny");
    }
  }
}

Compiler output:
Main.java:6: error: incompatible types: int cannot be converted to String
    String weather=scanner.nextInt();
                                  ^
1 error
Language: Java

import java.util.Scanner;
class main{
public static void Main(){
Scanner scanner=new Scanner(System.in);
int num=scanner.nextInt();
if(num%3==0){
  System.out.println("Rainy");
}else if(num%3==1){
  System.out.println("Sunny");
}else if(num%3==2){
  System.out.println("Cloudy");
}
}
}
class main{
public static void Main(){
Scanner scanner=new Scanner(System.in);
int num=scanner.nextInt();
if(num%3==0){
  System.out.println("Rainy");
}else if(num%3==1){
  System.out.println("Sunny");
}else if(num%3==2){
  System.out.println("Cloudy");
}
}
}

Compiler output:
Main.java:15: error: duplicate class: main
class main{
^
1 error
Language: Java

class main{
public static void Main(){
Scanner scanner=new Scanner(System.in);
int num=scanner.nextInt();
if(num%3==0){
  System.out.println("Rainy");
}else if(num%3==1){
  System.out.println("Sunny");
}else if(num%3==2){
  System.out.println("Cloudy");
}
}
}

Compiler output:
Main.java:3: error: cannot find symbol
Scanner scanner=new Scanner(System.in);
^
  symbol:   class Scanner
  location: class main
Main.java:3: error: cannot find symbol
Scanner scanner=new Scanner(System.in);
                    ^
  symbol:   class Scanner
  location: class main
2 errors
Language: Java

class main{
public static void Main(){
Scanner scanner=new Scanner(System.in);
int num=scanner.nextInt();
if(num%3==0){
  System.out.println("Rainy");
}else if(num%3==1){
  System.out.println("Sunny");
}else if(num%%3==2){
  System.out.println("Cloudy");
}
}
}

Compiler output:
Main.java:9: error: illegal start of expression
}else if(num%%3==2){
             ^
1 error
Language: Java

Scanner scanner=new Scanner(System.in);
int num=scanner.nextInt();
if(num%3==0){
  System.out.println("Rainy");
}else if(num%3==1){
  System.out.println("Sunny");
}else if(num%%3==2){
  System.out.println("Cloudy");
}

Compiler output:
Main.java:1: error: unnamed classes are a preview feature and are disabled by default.
Scanner scanner=new Scanner(System.in);
^
  (use --enable-preview to enable unnamed classes)
Main.java:3: error: class, interface, enum, or record expected
if(num%3==0){
^
Main.java:5: error: class, interface, enum, or record expected
}else if(num%3==1){
^
Main.java:7: error: class, interface, enum, or record expected
}else if(num%%3==2){
^
Main.java:9: error: class, interface, enum, or record expected
}
^
5 errors
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

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

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

import java.util.Scanner;

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

Compiler output:
Main.java:6: error: cannot find symbol
    String S=scann.next();
             ^
  symbol:   variable scann
  location: class Main
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:6: error: non-static method next() cannot be referenced from a static context
    String S=Scanner.next();
                    ^
1 error
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:6: error: cannot find symbol
    String S=scanner.next();
             ^
  symbol:   variable scanner
  location: class Main
1 error
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:11:1: error: 'elseif' was not declared in this scope
   11 | elseif(s=="Cloudy"){
      | ^~~~~~
a.cc:14:1: error: 'else' without a previous 'if'
   14 | else if(s=="Rainy"){
      | ^~~~
Language: C++

    #include<bits/stdc++.h>
     
     using namespace std;
     
    int main(){
      int n;
    	map<string,int> m;
      m["Sunny"]=0;
      m["Cloudy"]=1;
      m["Rainy"]=2;
      
      string s;
      cin>>s;
      n=m[s];
      cout<<m[(n+1)%3];
      
      
      
     
    return 0;
    }

Compiler output:
a.cc: In function 'int main()':
a.cc:15:14: error: no match for 'operator[]' (operand types are 'std::map<std::__cxx11::basic_string<char>, int>' and 'int')
   15 |       cout<<m[(n+1)%3];
      |              ^
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:504:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const key_type&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  504 |       operator[](const key_type& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:504:34: note:   no known conversion for argument 1 from 'int' to 'const std::map<std::__cxx11::basic_string<char>, int>::key_type&' {aka 'const std::__cxx11::basic_string<char>&'}
  504 |       operator[](const key_type& __k)
      |                  ~~~~~~~~~~~~~~~~^~~
/usr/include/c++/14/bits/stl_map.h:524:7: note: candidate: 'std::map<_Key, _Tp, _Compare, _Alloc>::mapped_type& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](key_type&&) [with _Key = std::__cxx11::basic_string<char>; _Tp = int; _Compare = std::less<std::__cxx11::basic_string<char> >; _Alloc = std::allocator<std::pair<const std::__cxx11::basic_string<char>, int> >; mapped_type = int; key_type = std::__cxx11::basic_string<char>]'
  524 |       operator[](key_type&& __k)
      |       ^~~~~~~~
/usr/include/c++/14/bits/stl_map.h:524:29: note:   no known conversion for argument 1 from 'int' to 'std::map<std::__cxx11::basic_string<char>, int>::key_type&&' {aka 'std::__cxx11::basic_string<char>&&'}
  524 |       operator[](key_type&& __k)
      |                  ~~~~~~~~~~~^~~
Language: C++

#include<bits/stdc++.h>



int main(){
  int n;
	map{string,int} m;
  m["Sunny"]=0;
  m["Cloudy"]=1;
  m["Rainy"]=2;
  
  string s;
  cin>>s;
  n=m[s];
  cout<<m[(n+1)%3];
  
  
  

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:9: error: 'map' was not declared in this scope
    7 |         map{string,int} m;
      |         ^~~
a.cc:7:9: note: suggested alternatives:
In file included from /usr/include/c++/14/map:63,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:152,
                 from a.cc:1:
/usr/include/c++/14/bits/stl_map.h:102:11: note:   'std::map'
  102 |     class map
      |           ^~~
/usr/include/c++/14/map:89:13: note:   'std::pmr::map'
   89 |       using map
      |             ^~~
a.cc:7:25: error: 'm' was not declared in this scope
    7 |         map{string,int} m;
      |                         ^
a.cc:12:3: error: 'string' was not declared in this scope
   12 |   string s;
      |   ^~~~~~
a.cc:12:3: note: suggested alternatives:
In file included from /usr/include/c++/14/string:41,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52:
/usr/include/c++/14/bits/stringfwd.h:77:33: note:   'std::string'
   77 |   typedef basic_string<char>    string;
      |                                 ^~~~~~
/usr/include/c++/14/string:76:11: note:   'std::pmr::string'
   76 |     using string    = basic_string<char>;
      |           ^~~~~~
a.cc:13:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   13 |   cin>>s;
      |   ^~~
      |   std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:146:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:13:8: error: 's' was not declared in this scope
   13 |   cin>>s;
      |        ^
a.cc:15:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   15 |   cout<<m[(n+1)%3];
      |   ^~~~
      |   std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: Java

import java.util.*;

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


Compiler output:
Main.java:7: error: cannot find symbol
    if(S == Sunny){
            ^
  symbol:   variable Sunny
  location: class Main
1 error
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    System.out,println("Sunny");
  }
}
    


Compiler output:
Main.java:7: error: not a statement
    System.out,println("Sunny");
          ^
Main.java:7: error: ';' expected
    System.out,println("Sunny");
              ^
2 errors
Language: Java

import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    System.out,pritnln("Sunny");
  }
}
    


Compiler output:
Main.java:7: error: not a statement
    System.out,pritnln("Sunny");
          ^
Main.java:7: error: ';' expected
    System.out,pritnln("Sunny");
              ^
2 errors
Language: Java

import java.util.*;

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

Compiler output:
Main.java:9: error: ';' expected
    }elif(S == "Cloudy"){
                        ^
Main.java:11: error: 'else' without 'if'
    }else{
     ^
2 errors
Language: C++

#include <iostream>
#include <string>

using namespace std;

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

Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main() {
      | ^~~~
Language: C++

#include <iostream>
#include <string>

using namespace std;

void main() {
  string s;
  cin >> s;
  if (s == "Rainy") {
    return "Sunny";
  } else if (s == "Sunny") {
    return "Cloudy";
  } else {
    return "Rainy";
  }
}

Compiler output:
a.cc:6:1: error: '::main' must return 'int'
    6 | void main() {
      | ^~~~
a.cc: In function 'int main()':
a.cc:10:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   10 |     return "Sunny";
      |            ^~~~~~~
      |            |
      |            const char*
a.cc:12:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   12 |     return "Cloudy";
      |            ^~~~~~~~
      |            |
      |            const char*
a.cc:14:12: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   14 |     return "Rainy";
      |            ^~~~~~~
      |            |
      |            const char*
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 {cout << "Sunny" << endl;}
  
  return 0}  

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected ';' before '}' token
   14 |   return 0}
      |           ^
      |           ;
Language: C++

#include<iostream>
#include<string>

using namespace ::std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:11: error: expected ';' before '}' token
   14 |   return 0}
      |           ^
      |           ;
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:7:13: error: 'i' was not declared in this scope
    7 |   else if(s[i]=='S')cout<<"Cloudy"<<endl;
      |             ^
Language: Java

import java.util.HashMap;
import java.util.Scanner;

public class A_WeatherPrediction {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner scn=new Scanner(System.in);
		HashMap<Character, String> hmap=new HashMap<>();
		hmap.put('S', "Cloudy");
		hmap.put('C', "Rainy");
		hmap.put('R', "Sunny");
		
		String str=scn.next();
		if(str.charAt(0)=='S') {
			System.out.println(hmap.get('S'));
		}else if(str.charAt(0)=='C') {
			System.out.println(hmap.get('C'));

		}else if(str.charAt(0)=='R'){
			System.out.println(hmap.get('R'));

		}
	}

}

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

#include<stdio.h>
#include<string.h>
int main(){
  char weather[10];
  char *wt_list[3] = {"Sunny","Cloudy","Rainy"};
  scanf("%s",weather);
  for(i=0;i<3;i++){
  	if(strcmp(weather,wt_list[i])){
  	  printf("%s",wt_list[(i+1)%3])
  	}
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:23: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    5 |   char *wt_list[3] = {"Sunny","Cloudy","Rainy"};
      |                       ^~~~~~~
a.cc:5:31: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    5 |   char *wt_list[3] = {"Sunny","Cloudy","Rainy"};
      |                               ^~~~~~~~
a.cc:5:40: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
    5 |   char *wt_list[3] = {"Sunny","Cloudy","Rainy"};
      |                                        ^~~~~~~
a.cc:7:7: error: 'i' was not declared in this scope
    7 |   for(i=0;i<3;i++){
      |       ^
Language: C

#include <stdio.h>

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


Compiler output:
main.c: In function 'main':
main.c:11:8: error: expected '(' before 'else'
   11 |     if else(w == "Cloudy")
      |        ^~~~
      |        (