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

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

#define REP(i, n) for (int i = 0; i < (n); i++)

const int month[] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30};
int main()
{
  int m, d, cntdays = 0;
  
  while (cin >> m >> d, m + d){
    cntdays = month[m - 1] + d;
    switch (cntdats % 7){
      case 1:
        cout << "Monday";
        break;
      case 2:
        cout << "Tuesday";
        break;
      case 3:
        cout << "Wednesday";
        break;
      case 4:
        cout << "Thursday";
        break;
      case 5:
        cout << "Friday";
        break;
      case 6:
        cout << "Saturday";
        break;
      case 0:
        cout << "Sunday";
        break;
      cout << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:13: error: 'cntdats' was not declared in this scope; did you mean 'cntdays'?
   13 |     switch (cntdats % 7){
      |             ^~~~~~~
      |             cntdays
Language: C++

#include <iostream>
#include <string>

using namespace std;

int min(){
	string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"};
	int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

	while(1){
		int m, d;
		cin >> m >> d;
		if(m == 0) break;

		while(m != 0){
			d = d + mon[m-1];
		}
		cout << y[d%7] <<endl;
	}
}

Compiler output:
a.cc: In function 'int min()':
a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <string>

using namespace std;

int min(){
	string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"};
	int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

	while(1){
		int m, d;
		cin >> m >> d;
		if(m == 0) break;

		while(m != 0){
			d = d + mon[m-1];
		}
		cout << y[d%7] << endl;
	}
}

Compiler output:
a.cc: In function 'int min()':
a.cc:20:1: warning: no return statement in function returning non-void [-Wreturn-type]
   20 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include <iostream>
#include <string>

using namespace std;

int min(){
	string y[7] = {"Wednesday", "Thrsday", "Frinday", "Saturday", "Sunday", "Monday", "Tuesday"};
	int mon[13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

	while(1){
		int m, d;
		cin >> m >> d;
		if(m == 0) break;

		while(m != 0){
			d = d + mon[m-1];
			m--;
		}
		cout << y[d%7] << endl;
	}
}

Compiler output:
a.cc: In function 'int min()':
a.cc:21:1: warning: no return statement in function returning non-void [-Wreturn-type]
   21 | }
      | ^
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

import java.util.*;
public class Main {
	static String[] Day=new String[10];
	public static void setDay(){
		Day[0]="Wednesday";
		Day[1]="Thursday";
		Day[2]="Friday";
		Day[3]="Saturday";
		Day[4]="Sunday";
		Day[5]="Monday";
		Day[6]="Tuesday";
	}
	static int[] Month=new int[20];
	public static void setMonth(){
		Month[1]=31;
		Month[2]=29;
		Month[3]=31;
		Month[4]=30;
		Month[5]=31;
		Month[6]=30;
		Month[7]=31;
		Month[8]=31;
		Month[9]=10;
		Month[10]=31;
		Month[11]=30;
		Month[12]=31;
	}
	public static void main(String args[]){
		setDay();
		setMonth();
		Scanner in=new Scanner(System.in);
		int date,month,days;
		while(in.hasNextInt()){
			month=in.nextInt();
			date=in.nextInt();
			if(month==0&&date==0)
				break;
			days=0;
			for(int i=1;i<month;i++)
				days+=Month[i];
			days+=date;
			System.out.println(Day[days%7]);
		}
		in.close();
	}
}

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

#include<iostream>
using namespace std;
int main(){
	int mon,day,week;
	while(1){
		cin>>mon>>day;
		if(mon==0)break;
		switch(mon){
			case 1:
			mon=0;
			break;
			case 2:
			mon=31;
			break;
			case 3:
			mon=60;
			break;
			case 4:
			mon=91;
			break;
			case 5:
			mon=121;
			break;
			case 6:
			mon=152;
			break;
			case 7:
			mon=182;
			break;
			case 8:
			mon=213;
			break;
			case 9:
			mon=244;
			break;
			case 10:
			mon=274;
			break;
			case 11:
			mon=305;
			break;
			case 12:
			mon=335;
			break;
		}
		week=(mon+day)%7;
		switch(week){
		    case 1:
			cout<<"??¨?????\ Thursday"<<endl;
			break;
			 case 2:
			cout<<"????????\ Friday"<<endl;
			break;
			 case 3:
			cout<<"????????\ Saturday"<<endl;
			break;
			 case 4:
			cout<<"??\?????\ Sunday"<<endl;
			break;
			 case 5:
			cout<<"????????\ Monday"<<endl;
			break;
			 case 6:
			cout<<"????????\ Tuesday"<<endl;
			break;
			 case 0:
			cout<<"?°´?????\ Wednesday"<<endl;
			break;
		}

Compiler output:
a.cc: In function 'int main()':
a.cc:49:31: warning: unknown escape sequence: '\040'
   49 |                         cout<<"??<U+00A8>?????\ Thursday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:52:31: warning: unknown escape sequence: '\040'
   52 |                         cout<<"????????\ Friday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~
a.cc:55:31: warning: unknown escape sequence: '\040'
   55 |                         cout<<"????????\ Saturday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~~~
a.cc:58:31: warning: unknown escape sequence: '\040'
   58 |                         cout<<"??\?????\ Sunday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~
a.cc:61:31: warning: unknown escape sequence: '\040'
   61 |                         cout<<"????????\ Monday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~
a.cc:64:31: warning: unknown escape sequence: '\040'
   64 |                         cout<<"????????\ Tuesday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~~
a.cc:67:31: warning: unknown escape sequence: '\040'
   67 |                         cout<<"?<U+00B0><U+00B4>?????\ Wednesday"<<endl;
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:69:18: error: expected '}' at end of input
   69 |                 }
      |                  ^
a.cc:5:17: note: to match this '{'
    5 |         while(1){
      |                 ^
a.cc:69:18: error: expected '}' at end of input
   69 |                 }
      |                  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

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

int main()
{
  int m,d;

  string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"};
  int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

  while ( scanf("%d %d", &m, &d), m != 0 ) {
    int day = 0;
    for (int i = 0; i < (m - 1); i++) {
      day += month[i];
    }
    day += d;
 
    cout << week[(day%7)-1] << endl;
  }
  return 0;
}

Compiler output:
a.cc:9:93: warning: missing terminating " character
    9 |   string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"};
      |                                                                                             ^
a.cc:9:93: error: missing terminating " character
    9 |   string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"};
      |                                                                                             ^~~
a.cc: In function 'int main()':
a.cc:9:84: error: 'Wednesday' was not declared in this scope
    9 |   string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"};
      |                                                                                    ^~~~~~~~~
a.cc:10:3: error: expected '}' before 'int'
   10 |   int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
      |   ^~~
a.cc:9:20: note: to match this '{'
    9 |   string week[7] = {"Thursday", "Friday", "Saturday", "Sunday","Mondy", "Tuesday", Wednesday"};
      |                    ^
a.cc:10:3: error: expected ',' or ';' before 'int'
   10 |   int month[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
      |   ^~~
a.cc:15:14: error: 'month' was not declared in this scope
   15 |       day += month[i];
      |              ^~~~~
Language: C++

from datetime import date
import calendar

while True:
    m, d = map(int, input().split())
    if not m:
        break
    print(calendar.day_name[date(2004, m, d).weekday()])

Compiler output:
a.cc:1:1: error: 'from' does not name a type
    1 | from datetime import date
      | ^~~~
Language: C++

#include<iostream>
using namespace std;
int main()
{
int day,month,day
while(cin>>month>>day&&month!=0)
{	
switch(m)
{
cace 1
switch(date%7)
{
case 1;
day=4;
break;
case 2;
day=5;
break;
case 3;
day=6;
break;
case 4;
day=7;
break;
case 5;
day=1;
break;
case 6;
day=2;
break;
case 0;
day=3;
break;
}
break;
case 2
switch(date%7)
{
case 1;
day=7;
break;
case 2;
day=1;
break;
case 3;
day=2;
break;
case 4;
day=3;
break;
case 5;
day=4;
break;
case 6;
day=5;
break;
case 0;
day=6;
break;
}
break;
case 3
switch(date%7)
{
case 1;
day=1;
break;
case 2;
day=2;
break;
case 3;
day=3;
break;
case 4;
day=4;
break;
case 5;
day=5;
break;
case 6;
day=6;
break;
case 0;
day=7;
break;
}
break;
case 4
switch(date%7)
{
case 1;
day=4;
break;
case 2;
day=5;
break;
case 3;
day=6;
break;
case 4;
day=7;
break;
case 5;
day=1;
break;
case 6;
day=2;
break;
case 0;
day=3;
break;
}
break;
case 5
switch(date%7)
{
case 1;
day=6;
break;
case 2;
day=7;
break;
case 3;
day=1;
break;
case 4;
day=2;
break;
case 5;
day=3;
break;
case 6;
day=4;
break;
case 0;
day=5;
break;
}
break;
case 6
switch(date%7)
{
case 1;
day=2;
break;
case 2;
day=3;
break;
case 3;
day=4;
break;
case 4;
day=5;
break;
case 5;
day=6;
break;
case 6;
day=7;
break;
case 0;
day=1;
break;
}
break;
case 7
switch(date%7)
{
case 1;
day=4;
break;
case 2;
day=5;
break;
case 3;
day=6;
break;
case 4;
day=7;
break;
case 5;
day=1;
break;
case 6;
day=2;
break;
case 0;
day=3;
break;
}
break;
case 8
switch(date%7)
{
case 1;
day=7;
break;
case 2;
day=1;
break;
case 3;
day=2;
break;
case 4;
day=3;
break;
case 5;
day=4;
break;
case 6;
day=5;
break;
case 0;
day=6;
break;
}
break;
case 9
switch(date%7)
{
case 1;
day=3;
break;
case 2;
day=4;
break;
case 3;
day=5;
break;
case 4;
day=6;
break;
case 5;
day=7;
break;
case 6;
day=1;
break;
case 0;
day=2;
break;
}
break;
case 10
switch(date%7)
{
case 1;
day=5;
break;
case 2;
day=6;
break;
case 3;
day=7;
break;
case 4;
day=1;
break;
case 5;
day=2;
break;
case 6;
day=3;
break;
case 0;
day=4;
break;
}
break;
case 11
switch(date%7)
{
case 1;
day=1;
break;
case 2;
day=2;
break;
case 3;
day=3;
break;
case 4;
day=4;
break;
case 5;
day=5;
break;
case 6;
day=6;
break;
case 0;
day=7;
break;
}
break;
case 12
switch(date%7)
{
case 1;
day=3;
break;
case 2;
day=4;
break;
case 3;
day=5;
break;
case 4;
day=6;
break;
case 5;
day=7;
break;
case 6;
day=1;
break;
case 0;
day=2;
break;
}
break;
}
switch(day)
{
case 1;
cout<<"Monday"<<endl;
break;
case 2;
cout<<"Tuesday"<<endl;
break;
case 3;
cout<<"Wednesday"<<endl;
break;
case 4;
cout<<"Thursday"<<endl; 
break;
case 5;
cout<<"Friday"<<endl;
break;
case 6;
cout<<"Saturday"<<endl;
break;
case 7;
cout<<"Sunday"<<endl;
break;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:1: error: expected initializer before 'while'
    6 | while(cin>>month>>day&&month!=0)
      | ^~~~~
Language: C++

#include<iostream>
#include<string>

int monthes[]={0,31,29,31,30,31,30,31,31,30,31,30,31};

std::string day[]={"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"};

int main(void){
    int m,d,n;
    while(std::cin>>m>>d){
        if(m==0&&d==0) break;
        n=0;
        int i;
        for(i=1;i<m;i++) n+=monthes[i];
        n+=d
        std::cout<<day[n%7]<<std::endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: expected ';' before 'std'
   15 |         n+=d
      |             ^
      |             ;
   16 |         std::cout<<day[n%7]<<std::endl;
      |         ~~~
Language: C++

#include<stdio.h>
#include<windows.h>

void y(int x ){
	if(x == 0)
		puts("Thursday");
	else if(x == 1)
		puts("Friday");
	else if(x == 2)
		puts("Saturday");
	else if(x == 3)
		puts("Sunday");
	else if(x == 4)
		puts("Monday");
	else if(x == 5)
		puts("Tuesday");
	else if(x == 6)
		puts("Wednesday");
}

int main(void){
	int M,D;
	while(1){
		int date = 0,ans;
		int m[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
		
		scanf("%d%d", &M, &D);
		if(M == 0 && D  == 0)break;
		for(int i = 1; i <= 12 ; i++){
			for(int j = 1; j <= m[i-1]; j++){
				if(i == M && j == D){
					ans = date;
				}
				printf("%d%dú%d\n",i,j,date%7);
	//			y(date%7);
				date++;
			}
			Sleep(1000);
		}
		y(ans%7);
	}
	
	return 0;
}

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

#include <stdio.h>

int total[] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30};

int Sum(int x) {
  int i, sum = 0;
  for(i = 0; i < x; i ++) {
    sum += total[i];
  }

  return sum;
}

int main() {
  int month, day;
  while(scanf("%d %d", &month, &day)) {
    if(month == 0) break;

    switch((Sum(month - 1) + day)%7) {
      case 0:
        printf("Thursday\n");
        break;

      case 1:
        printf("Friday\n");
        break;

      case 2:
        printf("Saturday\n");
        break;

      case 3:
        printf("Sunday\n");
        break;

Compiler output:
a.cc: In function 'int main()':
a.cc:34:15: error: expected '}' at end of input
   34 |         break;
      |               ^
a.cc:19:38: note: to match this '{'
   19 |     switch((Sum(month - 1) + day)%7) {
      |                                      ^
a.cc:34:15: error: expected '}' at end of input
   34 |         break;
      |               ^
a.cc:16:39: note: to match this '{'
   16 |   while(scanf("%d %d", &month, &day)) {
      |                                       ^
a.cc:34:15: error: expected '}' at end of input
   34 |         break;
      |               ^
a.cc:14:12: note: to match this '{'
   14 | int main() {
      |            ^
Language: C++


      case 6:
        printf("Tuesday\n");
        break;
    }
  }

  return 0;
}

Compiler output:
a.cc:2:7: error: expected unqualified-id before 'case'
    2 |       case 6:
      |       ^~~~
a.cc:4:9: error: expected unqualified-id before 'break'
    4 |         break;
      |         ^~~~~
a.cc:5:5: error: expected declaration before '}' token
    5 |     }
      |     ^
a.cc:6:3: error: expected declaration before '}' token
    6 |   }
      |   ^
a.cc:8:3: error: expected unqualified-id before 'return'
    8 |   return 0;
      |   ^~~~~~
a.cc:9:1: error: expected declaration before '}' token
    9 | }
      | ^
Language: C++

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

int main(){
int a,b,day;
string Day;
int days[]={31,29,31,30,31,30,31,31,30,31,30,31};
string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}

while(cin>>a>>b){
day=4;
for(int i=0;i<11;i++){
if(a>i+1)b+=days[i];}
day+=b;
day%=7;
for(int i=0;i<7;i++){
if(day==i)Day=Days[i]}
cout<<Day<<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:16: error: 'Sunday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                ^~~~~~
a.cc:9:23: error: 'Monday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                       ^~~~~~
a.cc:9:30: error: 'Tuesday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                              ^~~~~~~
a.cc:9:38: error: 'Wednesday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                                      ^~~~~~~~~
a.cc:9:48: error: 'Thursday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                                                ^~~~~~~~
a.cc:9:57: error: 'Friday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                                                         ^~~~~~
a.cc:9:64: error: 'Saturday' was not declared in this scope
    9 | string Days[]={Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}
      |                                                                ^~~~~~~~
a.cc:11:1: error: expected ',' or ';' before 'while'
   11 | while(cin>>a>>b){
      | ^~~~~
Language: C++

#include <iostream>
#include <string>
using namespace std;
int main(){
int n;
int m;
while(cin >>n>>m){
if(n==0){break;}
if(n==2){n=m+31;}
if(n==3){n=m+60;}
if(n==4){n=m+91;}
if(n==5){n=m+121;}
if(n==6){n=m+152;}
if(n==7){n=m+182;}
if(n==8){n=m+213;}
if(n==9){n=m+244;}
if(n==10){n=m+274;}
if(n==11){n=m+305;}
if(n==12){n=m+335;}
n=n%7;
if(n==1){cout <<"Thursday"}
if(n==2){cout <<"Friday"}
if(n==3){cout <<"Saturday"}
if(n==4){cout <<"Sunday"}
if(n==5){cout <<"Monday"}
if(n==6){cout <<"Tuesday"}
if(n==0){cout <<"Wednesday"}
cout <<endl;}}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:27: error: expected ';' before '}' token
   21 | if(n==1){cout <<"Thursday"}
      |                           ^
      |                           ;
a.cc:22:25: error: expected ';' before '}' token
   22 | if(n==2){cout <<"Friday"}
      |                         ^
      |                         ;
a.cc:23:27: error: expected ';' before '}' token
   23 | if(n==3){cout <<"Saturday"}
      |                           ^
      |                           ;
a.cc:24:25: error: expected ';' before '}' token
   24 | if(n==4){cout <<"Sunday"}
      |                         ^
      |                         ;
a.cc:25:25: error: expected ';' before '}' token
   25 | if(n==5){cout <<"Monday"}
      |                         ^
      |                         ;
a.cc:26:26: error: expected ';' before '}' token
   26 | if(n==6){cout <<"Tuesday"}
      |                          ^
      |                          ;
a.cc:27:28: error: expected ';' before '}' token
   27 | if(n==0){cout <<"Wednesday"}
      |                            ^
      |                            ;
Language: C++

include<iostream>
using namespace std;

int main(){

  int a[12] = {31,29,31,30,31,30,31,31,30,31,30,31};
  int n,m,d;

  while(cin >> n >> m, n, m){

    d = 0;

    for(int i=0;i<n-1;i++) d = a[i] + d;
 
    d = d + m;

    while(d > 6) d -= 7;
   
    if(d == 5) cout << "Monday" << endl;
    else if(d == 5) cout << "Tuesday" << endl;
    else if(d == 0) cout << "Wednesday" << endl;
    else if(d == 1) cout << "Thursday" << endl;
    else if(d == 2) cout << "Friday" << endl;
    else if(d == 3) cout << "Saturday" << endl;
    else if(d == 4) cout << "Sunday" << endl;

  }
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:9:9: error: 'cin' was not declared in this scope
    9 |   while(cin >> n >> m, n, m){
      |         ^~~
a.cc:19:16: error: 'cout' was not declared in this scope
   19 |     if(d == 5) cout << "Monday" << endl;
      |                ^~~~
a.cc:19:36: error: 'endl' was not declared in this scope
   19 |     if(d == 5) cout << "Monday" << endl;
      |                                    ^~~~
a.cc:20:21: error: 'cout' was not declared in this scope
   20 |     else if(d == 5) cout << "Tuesday" << endl;
      |                     ^~~~
a.cc:20:42: error: 'endl' was not declared in this scope
   20 |     else if(d == 5) cout << "Tuesday" << endl;
      |                                          ^~~~
a.cc:21:21: error: 'cout' was not declared in this scope
   21 |     else if(d == 0) cout << "Wednesday" << endl;
      |                     ^~~~
a.cc:21:44: error: 'endl' was not declared in this scope
   21 |     else if(d == 0) cout << "Wednesday" << endl;
      |                                            ^~~~
a.cc:22:21: error: 'cout' was not declared in this scope
   22 |     else if(d == 1) cout << "Thursday" << endl;
      |                     ^~~~
a.cc:22:43: error: 'endl' was not declared in this scope
   22 |     else if(d == 1) cout << "Thursday" << endl;
      |                                           ^~~~
a.cc:23:21: error: 'cout' was not declared in this scope
   23 |     else if(d == 2) cout << "Friday" << endl;
      |                     ^~~~
a.cc:23:41: error: 'endl' was not declared in this scope
   23 |     else if(d == 2) cout << "Friday" << endl;
      |                                         ^~~~
a.cc:24:21: error: 'cout' was not declared in this scope
   24 |     else if(d == 3) cout << "Saturday" << endl;
      |                     ^~~~
a.cc:24:43: error: 'endl' was not declared in this scope
   24 |     else if(d == 3) cout << "Saturday" << endl;
      |                                           ^~~~
a.cc:25:21: error: 'cout' was not declared in this scope
   25 |     else if(d == 4) cout << "Sunday" << endl;
      |                     ^~~~
a.cc:25:41: error: 'endl' was not declared in this scope
   25 |     else if(d == 4) cout << "Sunday" << endl;
      |                                         ^~~~
Language: C++

#include<stdio.h>

int main(void)
{
	int a=0,b=0,day=0;

	while(day != 10)
	{
		scnaf("%d %d",&a,&b);
		if(a==0 || b ==0)break;
		else if(a==1 || a==4 || a==7)
			day = 3 + b % 7;
		else if(a==2 || a==8)
			day = 6 + b % 7;
		else if(a==3 || a==11)
			day = b % 7;
		else if(a==5)
			day = 5 + b % 7;
		else if(a == 6)
			day = 1 + b % 7;
		else if(a==9 || a==12)
			day = 2 + b % 7;
		else 
			day = 4 + b % 7;
		if(day > 6)
			day-=7;
		switch (day)
		{
		case 1:
			printf("Monday\n");
			break;
		case 2:
			printf("Tuesday\n");
			break;
		case 3:
			printf("Wednesday\n");
			break;
		case 4:
			printf("Thursday\n");
			break;
		case 5:
			printf("Friday\n");
			break;
		case 6:
			printf("Saturday\n");
			break;
		case 0:
			printf("Sunday\n");
			break;
		}
	}
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: 'scnaf' was not declared in this scope; did you mean 'scanf'?
    9 |                 scnaf("%d %d",&a,&b);
      |                 ^~~~~
      |                 scanf
Language: C++

#include <vector>
#include <utility>
using namespace std;
typedef pair<int,int> MonthDay;
int main(){
  int monthnum[]={
    31,29,31,30,31,30,31,31,30,31,30,31
  };
  const string weekname[]={
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday"
  };
  vector<MonthDay> data;
  int month,day;
  while(cin>>month>>day){
    if(!month)break;
    data.push_back(MonthDay(month,day));
  }
  for(int i=0;i<data.size();i++){
    int daysum=0;
    for(int j=0;j<data[i].first-1;j++){
      daysum+=monthnum[j];
    }
    daysum+=data[i].second;
    int weekindex=(daysum+2)%7;
    cout<<weekname[weekindex]<<endl;
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'string' does not name a type
    9 |   const string weekname[]={
      |         ^~~~~~
a.cc:20:9: error: 'cin' was not declared in this scope
   20 |   while(cin>>month>>day){
      |         ^~~
a.cc:3:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
    2 | #include <utility>
  +++ |+#include <iostream>
    3 | using namespace std;
a.cc:31:5: error: 'cout' was not declared in this scope
   31 |     cout<<weekname[weekindex]<<endl;
      |     ^~~~
a.cc:31:5: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:31:11: error: 'weekname' was not declared in this scope
   31 |     cout<<weekname[weekindex]<<endl;
      |           ^~~~~~~~
a.cc:31:32: error: 'endl' was not declared in this scope
   31 |     cout<<weekname[weekindex]<<endl;
      |                                ^~~~
a.cc:3:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
    2 | #include <utility>
  +++ |+#include <ostream>
    3 | using namespace std;
Language: Java

import java.util.Scanner;


public class AOJ_Volume0028 {
	public static void main(String[] args){
		@SuppressWarnings("resource")
		Scanner sc = new Scanner(System.in);
		int[] count = new int[101];
		int max,value;
		while(sc.hasNext()){
			value = sc.nextInt();
			count[value]++;
		}
		max = count[0];
		for(int i=0;i<100;i++){
			if(max < count[i]) max = count[i];
		}
		for(int i=0;i<100;i++){
			if(max == count[i]) System.out.println(i);
		}
	}
}

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

import java.util.Scanner;

public class AOJ0028 {
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		int cnt[] = new int[100];
		
		while (input.hasNext()){
			int n = input.nextInt();
			cnt[--n]++;
		}
		
		int max = 0;
		for (int n : cnt){
			if (max < n){
				max = n;
			}
		}
		
		for (int i = 0; i < cnt.length; i++){
			if (cnt[i] == max){
				System.out.println(i + 1);
			}
		}
	}
}

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

import java.util.Scanner;

public class AOJ0028 {
	public static void Main(String[] args){
		Scanner input = new Scanner(System.in);
		int cnt[] = new int[100];
		
		while (input.hasNext()){
			int n = input.nextInt();
			cnt[--n]++;
		}
		
		int max = 0;
		for (int n : cnt){
			if (max < n){
				max = n;
			}
		}
		
		for (int i = 0; i < cnt.length; i++){
			if (cnt[i] == max){
				System.out.println(i + 1);
			}
		}
	}
}

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

import java.util.*;
public class Scanstr {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        int max = 0;
        
        int[] num;
        num = new int[101];
        Scanner input = new Scanner(System.in);
        while (input.hasNext()){
            int n = input.nextInt();
            num[n]++;
            if (max < num[n]){
                max = num[n];
            }
        }
        for (int i = 1; i <= 100; i++){
            if (num[i] == max){
                System.out.println(i);
            }
        }
    }
}

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

import java.util.*;
public class Scanstr {

    public static void main(String[] args) {
        // TODO code application logic here
        int max = 0;
        
        int[] num;
        num = new int[101];
        Scanner input = new Scanner(System.in);
        while (input.hasNext()){
            int n = input.nextInt();
            num[n]++;
            if (max < num[n]){
                max = num[n];
            }
        }
        for (int i = 1; i <= 100; i++){
            if (num[i] == max){
                System.out.println(i);
            }
        }
    }
}

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

import java.util.*;
public class Scanstr {
    public static void main(String[] args) {
        int max = 0;
        
        int[] num;
        num = new int[101];
        Scanner input = new Scanner(System.in);
        while (input.hasNext()){
            int n = input.nextInt();
            num[n]++;
            if (max < num[n]){
                max = num[n];
            }
        }
        for (int i = 1; i <= 100; i++){
            if (num[i] == max){
                System.out.println(i);
            }
        }
    }
}

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

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BuferedReader(new InputStreamReader(System.in));
String line;
int count[]=new int[101];
int max=0;
while((line=br.nextLine())!=null){
count[Integer.parseInt(line)]++;
}
for(int i=1;i<=100;i++){
max=Math.max(max,count[i]);
}
for(int i=0;i<=100;i++){
if(count[i]==max){
Sysem.out.println(i);
}
}
}
}

Compiler output:
Main.java:5: error: cannot find symbol
BufferedReader br=new BuferedReader(new InputStreamReader(System.in));
                      ^
  symbol:   class BuferedReader
  location: class Main
Main.java:9: error: cannot find symbol
while((line=br.nextLine())!=null){
              ^
  symbol:   method nextLine()
  location: variable br of type BufferedReader
Main.java:17: error: package Sysem does not exist
Sysem.out.println(i);
     ^
3 errors
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
int count[]=new int[101];
int max=0;
while((line=br.nextLine())!=null){
count[Integer.parseInt(line)]++;
}
for(int i=1;i<=100;i++){
max=Math.max(max,count[i]);
}
for(int i=0;i<=100;i++){
if(count[i]==max){
System.out.println(i);
}
}
}
}

Compiler output:
Main.java:9: error: cannot find symbol
while((line=br.nextLine())!=null){
              ^
  symbol:   method nextLine()
  location: variable br of type BufferedReader
1 error
Language: Java

import java.io.*;

class Main{
public static void main(String[] args){
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String line;
int count[]=new int[101];
int max=0;
while((line=br.readLine())!=null){
count[Integer.parseInt(line)]++;
}
for(int i=1;i<=100;i++){
max=Math.max(max,count[i]);
}
for(int i=0;i<=100;i++){
if(count[i]==max){
System.out.println(i);
}
}
}
}

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

import java.util.*;
import java.io.*;
public class Mode {
	public static void main(String[] args) throws Exception{
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		String line = in.readLine();
		int[] arr = new int[100];
		for (int i = 0; i < 100; i++) {
			arr[i] = 0;
		}
		while(line != null) {
			StringTokenizer tk = new StringTokenizer(line);
			int n = Integer.parseInt(tk.nextToken());
			arr[n]++;
			line = in.readLine();
		}
		LinkedList<Integer> l = new LinkedList<Integer>();
		int mode = 0;
		for (int i = 0; i < 100; i++) {
			if (arr[i] == mode) {
				l.add(i+1);
			}
			else if(arr[i] > mode){
				l = new LinkedList<Integer>();
				l.add(i+1);
				mode = arr[i];
			}
		}
		while(!l.isEmpty()) {
			System.out.println(l.remove());
		}
	}
}

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

class Main {

	public static void main(String[] args) {

		Scanner sc = null;
		Map<Integer, Integer> nums = new HashMap<Integer, Integer>();
		try {
			sc = new Scanner(System.in);
			int maxValue = 0;
			while (sc.hasNextInt()) {
				int num = sc.nextInt();
				nums.put(num, nums.containsKey(num) ? nums.get(num) + 1 : 1);
				if (maxValue < nums.get(num)) {
					maxValue = nums.get(num);
				}
			}
			Arrays.sort(nums.keySet().toArray());
			for (Entry<Integer, Integer> entry : nums.entrySet()) {
				if (maxValue == entry.getValue()) {
					System.out.println(entry.getKey());
				}
			}

		} finally {
			sc.close();
		}
	}
}

Compiler output:
Main.java:5: error: cannot find symbol
		Scanner sc = null;
		^
  symbol:   class Scanner
  location: class Main
Main.java:6: error: cannot find symbol
		Map<Integer, Integer> nums = new HashMap<Integer, Integer>();
		^
  symbol:   class Map
  location: class Main
Main.java:6: error: cannot find symbol
		Map<Integer, Integer> nums = new HashMap<Integer, Integer>();
		                                 ^
  symbol:   class HashMap
  location: class Main
Main.java:8: error: cannot find symbol
			sc = new Scanner(System.in);
			         ^
  symbol:   class Scanner
  location: class Main
Main.java:17: error: cannot find symbol
			Arrays.sort(nums.keySet().toArray());
			^
  symbol:   variable Arrays
  location: class Main
Main.java:18: error: cannot find symbol
			for (Entry<Integer, Integer> entry : nums.entrySet()) {
			     ^
  symbol:   class Entry
  location: class Main
6 errors
Language: Java

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

import java.io.File;
import java.io.FileReader;
import java.io.FileNotFoundException;

public class Main {
  public static void main(String args[] ) throws IOException {
    BufferedReader br;
    //input.txt???????????????
    br = InputFile.load();

    //?¨??????\???
    //BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    String s = "";
    int[] list = new int[9];
    while((s = br.readLine()) != null){
      int n = Integer.parseInt(s);
      list[(n-1)] += 1;
    }

    int max = 0;
    for ( int l: list) {
      if (l > max) {
        max = l;
      }
    }

    for (int i = 0; i < 9; i++) {
      if (list[i] == max) {
        System.out.println(i+1);
      }
    }
  }
}

Compiler output:
Main.java:13: error: cannot find symbol
    br = InputFile.load();
         ^
  symbol:   variable InputFile
  location: class Main
1 error
Language: Java

public class Main {

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

		while (sc.hasNext()) {
			int number = Integer.parseInt(sc.nextLine());
			array[number-1] += number;
		}

		for(int i = 0 ; i < array.length ; i++){
			if(array[i] > 0 ){
					array[i] /= i+1;
			}
		}
		int max = 0;
		for(int ary : array){
			if (ary > max) {
				max = ary;
			}
		}
		for (int i = 0; i < array.length; i++) {
			if(array[i] == max){
				System.out.println(i+1);
			}
		}
	}

}

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

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Map;
import java.util.HashMap;

public class Main{
	
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	
	public static void main(String[] args) throws IOException{
		
		int num[] = new int[101];
		
		while((String price = br.readLine()) != null){
			num[Integer.parseInt(price)]++;
		}
		
		int max = -1;
		
		for(int i = 1;i <= num.length;i++){
			
			if(max<num[i]) max = num[i];
			
		}
		
		for(int i = 1;i <= num.length;i++){
			
			if(max == num[i]) System.out.println(num[i]);
			
		}
	}
}

Compiler output:
Main.java:15: error: ',', ')', or '[' expected
		while((String price = br.readLine()) != null){
		                   ^
Main.java:15: error: illegal start of expression
		while((String price = br.readLine()) != null){
		                    ^
Main.java:15: error: illegal start of expression
		while((String price = br.readLine()) != null){
		                                     ^
Main.java:15: error: ';' expected
		while((String price = br.readLine()) != null){
		                                            ^
4 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		int[] count = new int[100];
		int max = 0;
		while(scan.hasNext()){
			int a = scan.nextInt();
			count[a-1]++;
			if(count[a-1] > max){
				max = count[a-1]:
			}
		}

		for(int i = 0; i < 100; i++){
			if(count[i] == max){
				System.out.printf("%d\n", i+1);
			}
		}
	}
}

Compiler output:
Main.java:13: error: ';' expected
				max = count[a-1]:
				                ^
1 error
Language: Java

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

//1???100?????´??°????????????????????????????????????????????????????????????
public class Q0028_ModeValue {
	public static void main(String[] args) throws Exception {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		System.out.println("????????????????????°??\???");
		int ds = Integer.parseInt(br.readLine());
		// ??????????????????????????°???????????????????´?
		Integer[] num = new Integer[ds];
		for (int i = 0; i < ds; i++) {
			num[i] = (int) (Math.random() * 9) + 1;
			System.out.println(num[i]);
		}
		System.out.print("????????????");
		// ??°?????????????????????????????????count?????????????´?
		int[] count = new int[ds];
		for (int i = 0; i < num.length; i++) {
			for (int j = 0; j < num.length; j++) {
				if (num[i] == num[j]) {
					count[i]++;
				}
			}
		}
		// count??????????????§???????±???????
		int max=count[0];
		for (int i = 1; i < count.length; i++) {
			if(count[i] > count[i-1]){
				//?????§??????i???max?????£??\
				max = i;
			}
		}
		System.out.println(num[max]);
	}
}

Compiler output:
Main.java:8: error: illegal escape character
		System.out.println("???????????????????????\???");
		                                            ^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class Main {
      public static void main(String[] args) throws Exception {
		 
           Scanner input = new Scanner(System.in);
	   ArrayList<Integer> result = new ArrayList<Integer>();
	   HashMap<Integer,Integer> count = new HashMap<Integer,Integer>();
           int maxCount = 0;

	    while (input.hasNext()) {
		int number = input.nextInt();
		if(count.containsKey(number)) {
		    count.put(number, count.get(number) + 1);
                    maxCount = Math.max(maxCount, count.get(number) + 1);
		}
                else {
                     count.put(number, 1);
                 }
                 for(Map.Entry<Integer,Integer> entry : count.entrySet()) {
                    if(entry.getValue == maxCount) {
                        result.add(entry.getKey());
                    }
                 } 
             }
            Collections.sort(result);
            for(int i = 0; i < result.size(); i++) {
                System.out.println(result.get(i));
            }

	  }
      }

Compiler output:
Main.java:22: error: cannot find symbol
                    if(entry.getValue == maxCount) {
                            ^
  symbol:   variable getValue
  location: variable entry of type Entry<Integer,Integer>
1 error
Language: Java

import java.util.List;
import java.util.ArrayList;
import java.util.Scanner;

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

		int[] intArray = new int[100];
		while(stdIn.hasNext()){
			intArray[stdIn.nextInt()-1]++;
		}
		int[] indexArray = indexOfMaxArrayNumber(intArray);

		for(int i:indexArray){
			System.out.println(i);
		}
	}
	//受け取った配列のなかで、最大の値を持っている要素の添え字＋１を配列にして返す
	//最大の値が複数あったときは、添え字＋１の値を小さい順に配列に格納して返す
	public static int[] indexOfMaxArrayNumber(int[] intArray){
		List<Integer> indexList = new ArrayList<Integer>();
		int max = 0;
		//intArrayの最大値を求める
		for(int i:intArray){
			max = Math.max(i, max);
		}

		for(int i = 0;i < intArray.length; i++){
			if(intArray[i] == max){
				indexList.add(i + 1);
			}
		}
		int[] indexArray = new int[indexList.size()];
		for(int i = 0;i < indexArray.length; i++){
			indexArray[i] = indexList.get(i);
		}
		return indexArray;
	}
}

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

import java.io.*;
import java.util.Scanner;
class Main{
  public static void main(String[] args)throws IOException{
    Scanner scan = new Scanner(System.in);
    int[] list = new int[100];
    while(scan.hasNextInt()){
      list[scan.nextInt()-1]++;
    }
    int max =0;
    for(int i=0;i<list.length;i++){
      max =Math.Max(max , list[i]);
    }
    for(int i=0;i<list.length;i++){
      if(max ==list[i]){
        System.out.printf("%f\n",(i+1));
    }
  }
  }
}

Compiler output:
Main.java:12: error: cannot find symbol
      max =Math.Max(max , list[i]);
               ^
  symbol:   method Max(int,int)
  location: class Math
1 error
Language: C

#include<stdio.h>
int main(void)
{
    int impo,in[101]={0},i,j,f=0,s=1,t=2;
    for(i=0;scanf("%d",&impo)!=EOF;i++)
    {
        in[impo]++;
    }
    if(in[0]<in[1])
    {
        f=1;
        s=0;
    }
    else if(in[0]>=in[1])
    {
        f=0;
        s=1;
    }
    for(i=2;i<101;i++)
    {
        if(in[s]<in[i])
        {
            if(in[f]<in[i])
            {
                s=f;
                j=f;
                f=i;
            }
            else
            {
                j=i;
                s=j;
            }
        }
    }
    if(a[f]==a[s])
    {
        if(a[f]<a[s])
        {
            j=f;
            f=s;
            s=j;
        }
        printf("%d\n%d\n",f,s);
    }
    else
    {
        printf("%d\n",f);
    }

    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:36:8: error: 'a' undeclared (first use in this function)
   36 |     if(a[f]==a[s])
      |        ^
main.c:36:8: note: each undeclared identifier is reported only once for each function it appears in
Language: C

include <stdio.h>
 
int main() {
    int data[128] = {0};
    int max = 0;
 
    int i;
 
    while(scanf("%d", &i) != EOF) {
        data[i]++;
 
        if(data[i] > max)
            max = data[i];
    }
 
    for(i = 0; i < 101; i++)  {
        if(data[i] == max)
            printf("%d\n", i);
    }
 
    return 0;
}

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

#include<stdio.h>
int main(void)
{
int max=0,a,i;
int count[101]={0};

while(scanf("%d",&a)!=EOF){
count[a]++;
if(max<count[a]) max=count[a];
}
for(i=0;i<100;i++){
if(max==count[i]){
printf("%d\n",i);
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:1: error: expected declaration or statement at end of input
   16 | }
      | ^
Language: C

#include <bits/stdc++.h>
using namespace std;
 
int main(){
    int t[102]={},tmp,k = 0,i;
    while(cin>>tmp){
        t[tmp+1]++;
        if(t[tmp+1]>k){
            k = t[tmp+1];
        }
    }
    for(i = 1;i <= 102;i++){
        if(t[i] == k){
            cout<<i-1<<endl;
        }
    }
    return 0;
}

Compiler output:
main.c: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<iostream>
using namespace std;

int main(){
  int j,k;
  int v[200]={0};
  int a;
  int max=0;

  while((scanf("%d",&a)!=EOF)){
    v[a-1]++;
  }

  for(k=0;k<100;k++){
    if(max < v[k])
      max = v[k];
  }
  for(k=0;k<100;k++){
    if(v[k]==max)
      printf("%d\n",k+1);
  }
  return 0;
}
    
    
  

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

#include <iostream>

using namespace std;

int main(){
	int num, max;
	int list[100] = {0};
	
	max = 0;

	while (cin >> num){
		list[num - 1]++;
	}
	for (int i = 0; i < 100; i++){
		if (max < list[i]){
			max = list[i];
		}
	}
	for (int j = 0; j < 100; j++){
		if (max == list[j]){
			cout << j + 1 << endl;
		}
	}
	return 0;
}

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

int main(void){
   int i, sum[1000],ma,  a, key, MAX;
   for(i = 0; i < 100; i++){
      sum[i] = 0;
   }
   while(scanf("%d", &a) != EOF){
      sum[a - 1]++;
   }
   MAX = sum[0];
   key = 1;
   for(i = 0; i < 100; i++){
      if(sum[i] > MAX){
         MAX = sum[i];
         key = i + 1;
      }
   }
   printf("%d", key);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:6:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:6:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:29: error: 'EOF' undeclared (first use in this function)
    6 |    while(scanf("%d", &a) != EOF){
      |                             ^~~
main.c:6:29: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:6:29: note: each undeclared identifier is reported only once for each function it appears in
main.c:17:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |    printf("%d", key);
      |    ^~~~~~
main.c:17:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:4: note: include '<stdio.h>' or provide a declaration of 'printf'
Language: C

int main(void){
   int i, sum[1000],???a, key, MAX;
   for(i = 0; i < 100; i++){
      sum[i] = 0;
   }
   while(scanf("%d", &a) != EOF){
      sum[a - 1]++;
   }
   MAX = sum[0];
   key = 1;
   for(i = 0; i < 100; i++){
      if(sum[i] > MAX){
         MAX = sum[i];
         key = i + 1;
      }
   }
   printf("%d", key);
   return 0;
}

Compiler output:
main.c: In function 'main':
main.c:2:21: error: expected identifier or '(' before '?' token
    2 |    int i, sum[1000],???a, key, MAX;
      |                     ^
main.c:6:10: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | int main(void){
main.c:6:10: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    6 |    while(scanf("%d", &a) != EOF){
      |          ^~~~~
main.c:6:10: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:23: error: 'a' undeclared (first use in this function)
    6 |    while(scanf("%d", &a) != EOF){
      |                       ^
main.c:6:23: note: each undeclared identifier is reported only once for each function it appears in
main.c:6:29: error: 'EOF' undeclared (first use in this function)
    6 |    while(scanf("%d", &a) != EOF){
      |                             ^~~
main.c:6:29: note: 'EOF' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
main.c:9:4: error: 'MAX' undeclared (first use in this function)
    9 |    MAX = sum[0];
      |    ^~~
main.c:10:4: error: 'key' undeclared (first use in this function)
   10 |    key = 1;
      |    ^~~
main.c:17:4: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
   17 |    printf("%d", key);
      |    ^~~~~~
main.c:17:4: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:17:4: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:17:4: note: include '<stdio.h>' or provide a declaration of 'printf'