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

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

import java.util.Scanner;

/**
 *
 * @author Nour
 */
public class JavaApplication41 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String x;
        Scanner n =new Scanner(System.in);
        x=n.next();
        if(x.equals("Sunny"))
            System.out.print("Cloudy");
        else if(x.equals("Cloudy"))
            System.out.print("Rainy");
        else if(x.equals("Rainy"))
            System.out.print("Sunny");
    }
    
}


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

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

import java.util.Scanner;

/**
 *
 * @author Nour
 */
public class JavaApplication41 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String x;
        Scanner n =new Scanner(System.in);
        x=n.next();
        if(x.equals("Sunny"))
            System.out.print("Cloudy");
        else if(x.equals("Cloudy"))
            System.out.print("Rainy");
        else if(x.equals("Sunny"))
            System.out.print("Sunny");
    }
    
}


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

string S;
scanf('%s',&S);
switch ('S'){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:1: error: unknown type name 'string'
    1 | string S;
      | ^~~~~~
main.c:2:7: warning: multi-character character constant [-Wmultichar]
    2 | scanf('%s',&S);
      |       ^~~~
main.c:2:7: error: expected declaration specifiers or '...' before '\x2573'
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf('%s',&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ('S'){
      | ^~~~~~
Language: C

str S;
scanf('%s',&S);
switch ('S'){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:1: error: unknown type name 'str'
    1 | str S;
      | ^~~
main.c:2:7: warning: multi-character character constant [-Wmultichar]
    2 | scanf('%s',&S);
      |       ^~~~
main.c:2:7: error: expected declaration specifiers or '...' before '\x2573'
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf('%s',&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ('S'){
      | ^~~~~~
Language: C

str "s";
scanf("%s",&'S');
switch ('S'){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
    1 | str "s";
      |     ^~~
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%s",&'S');
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%s",&'S');
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ('S'){
      | ^~~~~~
Language: C

string "S";
scanf('%s',&S);
switch ('S'){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before string constant
    1 | string "S";
      |        ^~~
main.c:2:7: warning: multi-character character constant [-Wmultichar]
    2 | scanf('%s',&S);
      |       ^~~~
main.c:2:7: error: expected declaration specifiers or '...' before '\x2573'
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf('%s',&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ('S'){
      | ^~~~~~
Language: C

str 'S';
scanf('%s',&S);
switch ('S'){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    1 | str 'S';
      |     ^~~
main.c:2:7: warning: multi-character character constant [-Wmultichar]
    2 | scanf('%s',&S);
      |       ^~~~
main.c:2:7: error: expected declaration specifiers or '...' before '\x2573'
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf('%s',&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ('S'){
      | ^~~~~~
Language: C

string 'S';
scanf("%s",&'S');
switch ("S"){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:8: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    1 | string 'S';
      |        ^~~
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%s",&'S');
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%s",&'S');
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ("S"){
      | ^~~~~~
Language: C

str 'S';
scanf("%s",&S);
switch ("S"){
case"sunny":
printf("cloudy");
break;
case"cloudy":
printf("rainy");
break;
case"rainy":
printf("sunny");
break;}

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    1 | str 'S';
      |     ^~~
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%s",&S);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%s",&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ("S"){
      | ^~~~~~
Language: C

str 'S';
scanf("%s",&S);
switch ("S")
case"sunny":
printf("cloudy");
case"cloudy":
printf("rainy");
case"rainy":
printf("sunny");

Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'S'
    1 | str 'S';
      |     ^~~
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%s",&S);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%s",&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ("S")
      | ^~~~~~
main.c:6:1: error: expected identifier or '(' before 'case'
    6 | case"cloudy":
      | ^~~~
main.c:8:1: error: expected identifier or '(' before 'case'
    8 | case"rainy":
      | ^~~~
Language: C

str S;
scanf("%s",&S);
switch ("S")
case"sunny":
printf("cloudy");
case"cloudy":
printf("rainy");
case"rainy":
printf("sunny");

Compiler output:
main.c:1:1: error: unknown type name 'str'
    1 | str S;
      | ^~~
main.c:2:7: error: expected declaration specifiers or '...' before string constant
    2 | scanf("%s",&S);
      |       ^~~~
main.c:2:12: error: expected declaration specifiers or '...' before '&' token
    2 | scanf("%s",&S);
      |            ^
main.c:3:1: error: expected identifier or '(' before 'switch'
    3 | switch ("S")
      | ^~~~~~
main.c:6:1: error: expected identifier or '(' before 'case'
    6 | case"cloudy":
      | ^~~~
main.c:8:1: error: expected identifier or '(' before 'case'
    8 | case"rainy":
      | ^~~~
Language: C++

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

int main () {

    string s;
    cin >> s;
     
  
    if (strcmp (s, "Sunny") == 0) cout << "Cloudy" << endl;
    if (strcmp (s, "Cloudy") == 0) cout << "Rainy" << endl;
    if (strcmp (s, "Rainy") == 0) cout << "Sunny" << endl;


}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   10 |     if (strcmp (s, "Sunny") == 0) cout << "Cloudy" << endl;
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:11:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   11 |     if (strcmp (s, "Cloudy") == 0) cout << "Rainy" << endl;
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
a.cc:12:17: error: cannot convert 'std::string' {aka 'std::__cxx11::basic_string<char>'} to 'const char*'
   12 |     if (strcmp (s, "Rainy") == 0) cout << "Sunny" << endl;
      |                 ^
      |                 |
      |                 std::string {aka std::__cxx11::basic_string<char>}
/usr/include/string.h:156:32: note:   initializing argument 1 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

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

Compiler output:
a.cc:7:38: warning: missing terminating " character
    7 |         if(s=="Sunny) cout << "Cloudy";
      |                                      ^
a.cc:7:38: error: missing terminating " character
    7 |         if(s=="Sunny) cout << "Cloudy";
      |                                      ^~
a.cc: In function 'int main()':
a.cc:7:15: error: unable to find string literal operator 'operator""Cloudy' with 'const char [16]', 'long unsigned int' arguments
    7 |         if(s=="Sunny) cout << "Cloudy";
      |               ^~~~~~~~~~~~~~~~~~~~~~~
a.cc:9:9: error: expected primary-expression before 'else'
    9 |         else cout << "Sunny";
      |         ^~~~
a.cc:8:46: error: expected ')' before 'else'
    8 |         else if(s=="Cloudy") cout << "Rainy";
      |                                              ^
      |                                              )
    9 |         else cout << "Sunny";
      |         ~~~~                                  
a.cc:7:11: note: to match this '('
    7 |         if(s=="Sunny) cout << "Cloudy";
      |           ^
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny') printf("Cloudy");
      |         ^~~~~~~
main.c:5:7: warning: comparison between pointer and integer
    5 |   if(s=='Sunny') printf("Cloudy");
      |       ^~
main.c:6:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   else if(s=='Cloudy') printf("Rainy");
      |              ^~~~~~~~
main.c:6:12: warning: comparison between pointer and integer
    6 |   else if(s=='Cloudy') printf("Rainy");
      |            ^~
main.c:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   else (s=='Rainy') printf("Sunny");
      |            ^~~~~~~
main.c:7:10: warning: comparison between pointer and integer
    7 |   else (s=='Rainy') printf("Sunny");
      |          ^~
main.c:7:20: error: expected ';' before 'printf'
    7 |   else (s=='Rainy') printf("Sunny");
      |                    ^~~~~~~
      |                    ;
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:3:8: error: array size missing in 's'
    3 |   char s[];
      |        ^
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny') printf("Cloudy");
      |         ^~~~~~~
main.c:5:7: warning: comparison between pointer and integer
    5 |   if(s=='Sunny') printf("Cloudy");
      |       ^~
main.c:6:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   else if(s=='Cloudy') printf("Rainy");
      |              ^~~~~~~~
main.c:6:12: warning: comparison between pointer and integer
    6 |   else if(s=='Cloudy') printf("Rainy");
      |            ^~
main.c:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   else (s=='Rainy') printf("Sunny");
      |            ^~~~~~~
main.c:7:10: warning: comparison between pointer and integer
    7 |   else (s=='Rainy') printf("Sunny");
      |          ^~
main.c:7:20: error: expected ';' before 'printf'
    7 |   else (s=='Rainy') printf("Sunny");
      |                    ^~~~~~~
      |                    ;
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny') printf("Cloudy");
      |         ^~~~~~~
main.c:6:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   else if(s=='Cloudy') printf("Rainy");
      |              ^~~~~~~~
main.c:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   else (s=='Rainy') printf("Sunny");
      |            ^~~~~~~
main.c:7:20: error: expected ';' before 'printf'
    7 |   else (s=='Rainy') printf("Sunny");
      |                    ^~~~~~~
      |                    ;
Language: C

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


Compiler output:
main.c: In function 'main':
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny')printf("Cloudy");
      |         ^~~~~~~
main.c:6:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   else if(s=='Cloudy')printf("Rainy");
      |              ^~~~~~~~
main.c:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   else (s=='Rainy')printf("Sunny");
      |            ^~~~~~~
main.c:7:20: error: expected ';' before 'printf'
    7 |   else (s=='Rainy')printf("Sunny");
      |                    ^~~~~~
      |                    ;
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:5:9: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    5 |   if(s=='Sunny')prinrf("Cloudy");
      |         ^~~~~~~
main.c:5:17: error: implicit declaration of function 'prinrf'; did you mean 'printf'? [-Wimplicit-function-declaration]
    5 |   if(s=='Sunny')prinrf("Cloudy");
      |                 ^~~~~~
      |                 printf
main.c:6:14: warning: multi-character literal with 6 characters exceeds 'int' size of 4 bytes
    6 |   else if(s=='Cloudy')prinrf("Rainy");
      |              ^~~~~~~~
main.c:7:12: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    7 |   else (s=='Rainy')prinrf("Sunny");
      |            ^~~~~~~
main.c:7:20: error: expected ';' before 'prinrf'
    7 |   else (s=='Rainy')prinrf("Sunny");
      |                    ^~~~~~
      |                    ;
Language: C++

mydict = {"Sunny":"Cloudy", "Cloudy":"Rainy", "Rainy":"Sunny"}
print(mydict[input()])

Compiler output:
a.cc:1:1: error: 'mydict' does not name a type
    1 | mydict = {"Sunny":"Cloudy", "Cloudy":"Rainy", "Rainy":"Sunny"}
      | ^~~~~~
a.cc:2:6: error: expected constructor, destructor, or type conversion before '(' token
    2 | print(mydict[input()])
      |      ^
Language: C++

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


int main()
{
 string s;
 cin>>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:10:12: error: could not convert 's.std::__cxx11::basic_string<char>::operator=(((const char*)"Cloudy"))' from 'std::__cxx11::basic_string<char>' to 'bool'
   10 |  else if (s="Cloudy") printf("Rainy");
      |           ~^~~~~~~~~
      |            |
      |            std::__cxx11::basic_string<char>
Language: C++

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

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

Compiler output:
a.cc:13:11: warning: missing terminating " character
   13 |     cout<<"Sunny<<endl;
      |           ^
a.cc:13:11: error: missing terminating " character
   13 |     cout<<"Sunny<<endl;
      |           ^~~~~~~~~~~~~
a.cc: In function 'int main()':
a.cc:15:5: error: expected primary-expression before 'return'
   15 |     return 0;
      |     ^~~~~~
Language: C++

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

int main() {

string N;
  cin>>N;
  
  if(N=="sunny"){N="cloudy"}
  else if(N=="cloudy"){N="rainy"}
   else if(N=="rainy"){N="sunny"}
	cout<<N<<endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:9:28: error: expected ';' before '}' token
    9 |   if(N=="sunny"){N="cloudy"}
      |                            ^
      |                            ;
a.cc:10:33: error: expected ';' before '}' token
   10 |   else if(N=="cloudy"){N="rainy"}
      |                                 ^
      |                                 ;
a.cc:11:33: error: expected ';' before '}' token
   11 |    else if(N=="rainy"){N="sunny"}
      |                                 ^
      |                                 ;
Language: C++

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

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

}

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

#include<bits/stdc++.h>

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

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

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

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

Compiler output:
a.cc: In function 'int main()':
a.cc:14:30: error: expected ';' before '}' token
   14 |                 ans = "Sunny"
      |                              ^
      |                              ;
   15 |         }
      |         ~
Language: C++

#include <bits/stdc++.h>

using namespace std;

int main() {
	ios::sync_with_stdio(false);
	string s[3] = {"Sunny", "Cloudy", "Rainy"};
	string t;
	cin>>t;
	for (int i = 0; i < 3; i++)
		if (s[i] == t) {
			cout<<<s[(i + 1) % 3];
			return 0;
		}	
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: expected primary-expression before '<' token
   12 |                         cout<<<s[(i + 1) % 3];
      |                               ^
Language: C++

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


int main(){
  string w[4]={"Sunny", "Cloudy", "Rainy", "Sunnny"}
  string a;
  cin>>a;
  for(int i=0; i<3; i++){
    if(a==w[i]){
      cout<<w[i+1]<<endl;
      break;
    }
  }

}

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

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


int main(){
  vector<string> w={"Sunny", "Cloudy", "Rainy", "Sunnny"}
  stirng a;
  cin>>a;
  for(int i=0; i<3; i++){
    if(a==w[i]){
      cout<<w[i+1]<<endl;
      break;
    }
  }

}

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

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


int main(){
  string w[4]={"Sunny", "Cloudy", "Rainy", "Sunnny"}
  stirng a;
  cin>>a;
  for(int i=0; i<3; i++){
    if(a==w[i]){
      cout<<w[i+1]<<endl;
      break;
    }
  }

}

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

// BEGINNING WITH NAME OF ALMIGHTY GOD ALLAH
// AUTHOR:: MOHAMMAD FAISAL
// ATCODER BEGINNERS PROBLEMS
//#include<bits/stdc++.h>
#include<iostream>
using namespace std;
int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.flush();
   	string s;
    cin >> s;
    if(s=="Sunny")
      cout<<"Cloudy"
    if(s=="Cloudy")
      cout<<"Rainy"
    if(s=="Rainy")
      cout<<"Sunny";
    return 0;
    // Bye Bye 2019
}



Compiler output:
a.cc: In function 'int main()':
a.cc:15:21: error: expected ';' before 'if'
   15 |       cout<<"Cloudy"
      |                     ^
      |                     ;
   16 |     if(s=="Cloudy")
      |     ~~
Language: C++

#include <bits/stdc++.h>

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'string' was not declared in this scope
    4 |         string s;
      |         ^~~~~~
a.cc:4:9: 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:5:9: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
    5 |         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:5:16: error: 's' was not declared in this scope
    5 |         cin >> s;
      |                ^
a.cc:6:26: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    6 |         if(s == "Rainy") cout << "Sunny";
      |                          ^~~~
      |                          std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:7:31: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    7 |         else if(s == "Sunny") cout << "Cloudy";
      |                               ^~~~
      |                               std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:8:14: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    8 |         else cout << "Rainy";
      |              ^~~~
      |              std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:9:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
    9 |         cout << '\n';
      |         ^~~~
      |         std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |         if(s[0] == "S"){
a.cc:10:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     }else if(s[0] == "R"){
Language: C++

#include<bits/stdc++.h>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:18: error: 'S' was not declared in this scope
    8 |         if(s[0]==S){
      |                  ^
a.cc:10:22: error: 'R' was not declared in this scope
   10 |     }else if(s[0] == R){
      |                      ^
Language: C

#include <stdio.h>
#include <queue>

int N;
int M;
std::priority_queue<int> pq;

int main()
{
	int i;
	scanf("%d %d", &N, &M);

	for (i = 0; i < N; i++) {
		int x;
		scanf("%d", &x);
		pq.push(x);
	}

	for (i = 0; i < M; i++) {
		int price = pq.front();
		pq.pop();
		price /= 2;
		pq.push(price);
	}
	long long sum = 0;

	for (i = 0; i < N; i++) {
		sum += pq.front();
		pq.pop();
	}

	printf("%lld\n", sum);

	return 0;
}

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

#include <stdio.h>
#include <queue>

using namespace std;

int n, m;
std::priority_queue<int> pq;

int main()
{
	int a;
	scanf("%d %d", &n, &m);

	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		pq.push(a);
	}

	for (i = 0; i < m; i++) {
		int t = pq.top(); pq.pop();
		t /= 2;
		pq.push(t);
	}
	long long ans = 0;

	for (i = 0; i < n; i++) {
		ans += pq.top(); pq.pop();
	}

	printf("%lld\n", ans);

	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:14: error: 'i' was not declared in this scope
   14 |         for (i = 0; i < n; i++) {
      |              ^
a.cc:19:14: error: 'i' was not declared in this scope
   19 |         for (i = 0; i < m; i++) {
      |              ^
a.cc:26:14: error: 'i' was not declared in this scope
   26 |         for (i = 0; i < n; i++) {
      |              ^
Language: C

#include <stdio.h>
#include <queue>

int main(void) {
  int N, M, tmp;
  long long sum = 0;

  scanf("%d %d", &N, &M);
  std::priority_queue<int> queue;

  for(int i = 0; i < N; i++) {
    scanf("%d", &tmp);
    queue.push(tmp);
  }

  while(M >= 1) {
    tmp = queue.top() / 2;
    queue.pop();
    queue.push(tmp);
    M--;
  }

  while (!queue.empty()) {
    sum += queue.top();
    queue.pop();
  }
  
  printf("%lld\n", sum);

}



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

#include<stdio.h>
#include<queue>

int N;
int M;

std::priority_queue<int> pq;

int main(){
		scanf("%d %d",&N,&M);
		for(int i = 0;i < N;i++){
			int x;
			scanf("%d",&x);
			pq push (x);
		}

		for (int = 0;i < M; i++){
			int price = pq, top(); pq,pop();
			price /= 2;
			pq push(price);
		}

	long long sum = 0;
	int z;
	while (!pq = empty()){

		z += dequeue(&pq);

	}
	sum = z;
	printf("%lld\n",sum);
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ';' before 'push'
   14 |                         pq push (x);
      |                           ^~~~~
      |                           ;
a.cc:17:26: error: expected unqualified-id before '=' token
   17 |                 for (int = 0;i < M; i++){
      |                          ^
a.cc:17:25: error: expected ';' before '=' token
   17 |                 for (int = 0;i < M; i++){
      |                         ^~
      |                         ;
a.cc:17:26: error: expected primary-expression before '=' token
   17 |                 for (int = 0;i < M; i++){
      |                          ^
a.cc:17:30: error: 'i' was not declared in this scope
   17 |                 for (int = 0;i < M; i++){
      |                              ^
a.cc:17:35: error: expected ')' before ';' token
   17 |                 for (int = 0;i < M; i++){
      |                     ~             ^
      |                                   )
a.cc:17:37: error: 'i' was not declared in this scope
   17 |                 for (int = 0;i < M; i++){
      |                                     ^
a.cc:25:16: error: no match for 'operator!' (operand type is 'std::priority_queue<int>')
   25 |         while (!pq = empty()){
      |                ^~~
a.cc:25:16: note: candidate: 'operator!(bool)' (built-in)
a.cc:25:16: note:   no known conversion for argument 1 from 'std::priority_queue<int>' to 'bool'
a.cc:25:22: error: 'empty' was not declared in this scope; did you mean 'std::empty'?
   25 |         while (!pq = empty()){
      |                      ^~~~~
      |                      std::empty
In file included from /usr/include/c++/14/deque:68,
                 from /usr/include/c++/14/queue:62,
                 from a.cc:2:
/usr/include/c++/14/bits/range_access.h:302:5: note: 'std::empty' declared here
  302 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
a.cc:27:22: error: 'dequeue' was not declared in this scope
   27 |                 z += dequeue(&pq);
      |                      ^~~~~~~
Language: C

#include <stdio.h>
#include <queue>

using namespace std;

int n, m;
std::priority_queue<int> pq;

int main()
{
	int a;
	scanf("%d %d", &n, &m);

	for (i = 0; i < n; i++) {
		scanf("%d", &a);
		pq.push(a);
	}

	for (i = 0; i < m; i++) {
		int t = pq.top(); pq.pop();
		t /= 2;
		pq.push(t);
	}
	long long ans = 0;

	for (i = 0; i < n; i++) {
		ans += pq.top(); pq.pop();
	}

	printf("%lld\n", ans);

	return 0;
}


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

int main(void) {
  int N, M, tmp, sum = 0;

  scanf("%d %d", &N, &M);
  std::priority_queue<int> queue;

  for(int i = 0; i < N; i++) {
    scanf("%d", &tmp);
    queue.push(tmp);
  }

  while(M >= 1) {
    tmp = queue.top() / 2;
    queue.pop();
    queue.push(tmp);
    M--;
  }

  while (!queue.empty()) {
    sum += queue.top();
    queue.pop();
  }

  printf("%d\n", sum);

}


Compiler output:
main.c: In function 'main':
main.c:4:3: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    4 |   scanf("%d %d", &N, &M);
      |   ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void) {
main.c:4:3: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    4 |   scanf("%d %d", &N, &M);
      |   ^~~~~
main.c:4:3: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:5:3: error: 'std' undeclared (first use in this function)
    5 |   std::priority_queue<int> queue;
      |   ^~~
main.c:5:3: note: each undeclared identifier is reported only once for each function it appears in
main.c:5:6: error: expected ';' before '::' token
    5 |   std::priority_queue<int> queue;
      |      ^~
      |      ;
main.c:9:5: error: 'queue' undeclared (first use in this function)
    9 |     queue.push(tmp);
      |     ^~~~~
main.c:24:3: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   24 |   printf("%d\n", sum);
      |   ^~~~~~
main.c:24:3: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:24:3: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:24:3: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C++

int main(void) {
  int N, M, tmp, sum = 0;

  scanf("%d %d", &N, &M);
  std::priority_queue<int> queue;

  for(int i = 0; i < N; i++) {
    scanf("%d", &tmp);
    queue.push(tmp);
  }

  while(M >= 1) {
    tmp = queue.top() / 2;
    queue.pop();
    queue.push(tmp);
    M--;
  }

  while (!queue.empty()) {
    sum += queue.top();
    queue.pop();
  }

  printf("%d\n", sum);

}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:3: error: 'scanf' was not declared in this scope
    4 |   scanf("%d %d", &N, &M);
      |   ^~~~~
a.cc:5:8: error: 'priority_queue' is not a member of 'std'
    5 |   std::priority_queue<int> queue;
      |        ^~~~~~~~~~~~~~
a.cc:1:1: note: 'std::priority_queue' is defined in header '<queue>'; this is probably fixable by adding '#include <queue>'
  +++ |+#include <queue>
    1 | int main(void) {
a.cc:5:23: error: expected primary-expression before 'int'
    5 |   std::priority_queue<int> queue;
      |                       ^~~
a.cc:9:5: error: 'queue' was not declared in this scope
    9 |     queue.push(tmp);
      |     ^~~~~
a.cc:13:11: error: 'queue' was not declared in this scope
   13 |     tmp = queue.top() / 2;
      |           ^~~~~
a.cc:19:11: error: 'queue' was not declared in this scope
   19 |   while (!queue.empty()) {
      |           ^~~~~
a.cc:24:3: error: 'printf' was not declared in this scope
   24 |   printf("%d\n", sum);
      |   ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main(void) {
Language: C++

#include < bits/stdc++.h >

using namespace std;

int main(){
int n,m;cin>>n>>m;
priority_queue <long long> a;
for(int i=0;i<n;i++){
    long long b;
    cin>>b;
    a.push(b);
}
while(m--){
    long long c=a.top()/2;
    a.pop();
    a.push(c);
}
long long ans=0;
while(!a.empty()){
    ans+=a.top();
    a.pop();
}
cout<<ans;
}

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

#include<stdio.h>
#include<string.h>
int main (void){
    char *S[];
    char *s1 = "Sunny";
    char *s2 = "Rainy";
    char *s3 = "Cloudy";
    scanf("%s",S);

    if(strcmp(S,s1)== 0){
        printf("Cloudy\n");
    }else if(strcmp(S,s2)==0){
        printf("Sunny\n");
    }else if(strcmp(S,s3)==0){
        printf("Rainy\n");
    }
    return 0;
}


Compiler output:
main.c: In function 'main':
main.c:4:11: error: array size missing in 'S'
    4 |     char *S[];
      |           ^
main.c:10:15: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   10 |     if(strcmp(S,s1)== 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:12:21: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   12 |     }else if(strcmp(S,s2)==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:14:21: error: passing argument 1 of 'strcmp' from incompatible pointer type [-Wincompatible-pointer-types]
   14 |     }else if(strcmp(S,s3)==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)
      |                    ~~~~~~~~~~~~^~~~
Language: C++

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

int main()
{
    string s[3]={"Sunny","Cloudy","Rainy"};
    string w;
    cin>>w;
    for(int i=0;i<3;i++)
    {
        if(strcmp(&s[i][0],&w[0])==0 && i!=2){
            cout<<s[i+1];break;}
        else if(i==2){
            cout<<s[0];break;}
    }
    return 0;
}


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

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0]==0))
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: cannot convert 'bool' to 'const char*'
   12 |        if(strcmp(&K[i][0],&S[0]==0))
      |                           ~~~~~^~~
      |                                |
      |                                bool
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],S[0]==0))
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:12:31: error: cannot convert 'bool' to 'const char*'
   12 |        if(strcmp(&K[i][0],S[0]==0))
In file included from /usr/include/c++/14/cstring:43,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:121,
                 from a.cc:1:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],S[0]==0))
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:31: error: cannot convert 'bool' to 'const char*'
   14 |        if(strcmp(&K[i][0],S[0]==0))
In file included from a.cc:3:
/usr/include/string.h:156:50: note:   initializing argument 2 of 'int strcmp(const char*, const char*)'
  156 | extern int strcmp (const char *__s1, const char *__s2)
      |                                      ~~~~~~~~~~~~^~~~
Language: C++

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(k[i]==s)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'k' was not declared in this scope
   13 |        if(k[i]==s)
      |           ^
a.cc:13:17: error: 's' was not declared in this scope
   13 |        if(k[i]==s)
      |                 ^
Language: C++

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0])==0)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


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

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

int main()
{
    int i;
   string K[3]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0])==0)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'strcmp' was not declared in this scope
   13 |        if(strcmp(&K[i][0],&S[0])==0)
      |           ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include <strings.h>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

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

int main()
{
    int i;
   char K[3][7]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0])==0)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


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

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

int main()
{
    int i;
   char K[3][7]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0])==0)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


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

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

int main()
{
    int i;
   char K[3][7]={"Sunny","Cloudy","Rainy"};
   string S;
   cin>>S;
   for(i=0;i<3;i++)
   {
       if(strcmp(&K[i][0],&S[0])==0)
       {
           if(i==2){
            cout<<K[0];
           }
           else{
           cout<<K[i+1];
           }
       }
   }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:13:11: error: 'strcmp' was not declared in this scope
   13 |        if(strcmp(&K[i][0],&S[0])==0)
      |           ^~~~~~
a.cc:3:1: note: 'strcmp' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    2 | #include<strings.h>
  +++ |+#include <cstring>
    3 | using namespace std;
Language: C++

//#include <tourist>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <string>
#include <iomanip>
#include <limits>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <list>
#include <queue>
#include <tuple>
#include <deque>
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <utility>
#include <complex>
#include <functional>
using namespace std;
const int MOD = 1000000007;
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = (1 << 28);
const int dx[4] = {0, 1, 0, -1}, dy[4] = {-1, 0, 1, 0};
const int Dx[8] = {0, 1, 1, 1, 0, -1, -1, -1}, Dy[8] = {-1, -1, 0, 1, 1, 1, 0, -1};
#define yes cout << "Yes" << endl
#define YES cout << "YES" << endl
#define no cout << "No" << endl
#define NO cout << "NO" << endl
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = n; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
//setprecision(15)有効数字15桁
//-std=c++14
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a, ll b)
{
    return a * b / gcd(a, b);
}
struct edge {
    int to, cost;
};
int n, b, c;
vector<int> a;
stirng s;
int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> s;
  	if(s=="Sunny") cout<<"Cloudy"<<"\n";
  	if(s=="Cloudy") cout<<"Rainy"<<"\n";
  	if(s=="Rainy") cout<<"Sunny"<<"\n";
  
}



Compiler output:
a.cc:52:1: error: 'stirng' does not name a type
   52 | stirng s;
      | ^~~~~~
a.cc: In function 'int main()':
a.cc:57:12: error: 's' was not declared in this scope
   57 |     cin >> s;
      |            ^