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

#include<iostream>
using namespace std;

int main(){
    int grid[14][14];
    int s[4][2]={{0,-1},{0,1},{-1,0},{1,0}};
    int m[4][2]={{-1,-1},{-1,1},{1,-1},{1,1}};
    int l[4][2]={{0,-2},{0,2},{-2,0},{2,0}};
    int x, y, size;
    int i, j;
    int max=0;
    int blank;
    char comma;
    for(i=0;i<14;i++){
        for(j=0;j<14;j++){
            grid[i][j] = 0;
        }
    }
    while(cin >> x >> comma >> y >> comma >> size){
        x += 2;
        y += 2;
        grid[x][y] += 1;
        for(i=0;i<4;i++){
            grid[x+s[0]][y+s[1]] += 1;
        }
        if(size > 1){
            for(i=0;i<4;i++){
                grid[x+m[0]][y+m[1]] += 1;
            }
            if(size > 2){
                for(i=0;i<4;i++){
                    grid[x+l[0]][y+l[1]] += 1;
                }
            }
        }
    }
    for(i=2;i<12;i++){
        for(j=2;j<12;j++){
            if(grid[i][j] > max){
                max = grid[i][j];
            }else if(grid[i][j] = 0){
                blank += 1;
            }
        }
    }
    cout << blank << endl;
    cout << max << endl;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:17: error: invalid types 'int [14][14][int*]' for array subscript
   24 |             grid[x+s[0]][y+s[1]] += 1;
      |                 ^
a.cc:28:21: error: invalid types 'int [14][14][int*]' for array subscript
   28 |                 grid[x+m[0]][y+m[1]] += 1;
      |                     ^
a.cc:32:25: error: invalid types 'int [14][14][int*]' for array subscript
   32 |                     grid[x+l[0]][y+l[1]] += 1;
      |                         ^
Language: C++

#include<iostream>
#include<vector>
#include <algorithm>
#include<stdio.h>
int main(){
	std::vector<std::vector<int>> vec(10,std::vector<int>(10,0));
	while(1){
		int x,y,size;
		scanf("%d,%d,%d",&x,&y,&size);
		//std::cin>>x>>y>>size;
		if(scanf.eof())break;
		//if(x==0&&y==0&&size==0)break;
		vec[y][x]++;
		vec[y-1][x]++;
		vec[y+1][x]++;
		vec[y][x-1]++;
		vec[y][x+1]++;
		if(size>=2){
			vec[y-1][x-1]++;
			vec[y-1][x+1]++;
			vec[y+1][x-1]++;
			vec[y+1][x+1]++;
		}
		if(size==3){
			vec[y-2][x]++;
			vec[y+2][x]++;
			vec[y][x-2]++;
			vec[y][x+2]++;
		}
	}
	std::vector<int> vec2(100);
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++)vec2[i*10+j]=vec[i][j];
	}
	int no=0;
	for(int i=0;i<100;i++){
		if(vec2[i]==0)no++;
	}
	std::cout<<no<<std::endl;
	sort(vec2.begin(),vec2.end(),std::greater<int>());
	std::cout<<vec2[0]<<std::endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:26: error: request for member 'eof' in 'scanf', which is of non-class type 'int(const char*, ...)'
   11 |                 if(scanf.eof())break;
      |                          ^~~
Language: C++


#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <stack>
#include <cctype>
#include <complex>
#include <vector>
#include <algorithm>
#include <cassert>

using namespace std;


bool solve(){
	int dx1[] = {0, 1, 0, -1, 0};
	int dy1[] = {0, 0, 1, 0, -1};
	int dx2[] = {0, 0, 0, 1, 1, 1, -1, -1, -1};
	int dy2[] = {-1, 0, 1, -1, 0, 1, -1, 0, 1};
	int dx3[] = {0, 0, 0, 0, 0, 1, 1, 1, 2, -1, -1, -1, -2};
	int dy3[] = {-2, -1, 0, 1, 2, -1, 0, 1, 0, -1, 0, 1, 0};

	int a[14][14] = {0};
	int x, y, size;
	char c[2];
	while(cin>>x){
		cin>> c[0]>> y>> c[1]>> size;
		x += 2;
		y += 2;
		switch(size){
			case 1:
				for(int i=0;i<5;i++){
					a[x+dx1[i]][y+dy1[i]]++;
				}
				break;
			case 2:
				for(int i=0;i<9;i++){
					a[x+dx2[i]][y+dy2[i]]++;
				}
				break;
			case 3:
				for(int i=0;i<13;i++){
					a[x+dx3[i]][y+dy3[i]]++;
				}
				break;
			default: 
				cout<< "default"<< endl;
				break;
		}
	}
	int ans = 0;
	int ans2 = 0;
	for(int i=2;i<12;i++){
		for(int j=2;j<12;j++){
			if(a[i][j] == 0) ans++;
			ans2 = max(ans2, a[i][j]);
		}
	}
	cout<< ans<< endl
	cout<< ans2<< endl;
	
	return true;
}

int main(){
	cout.setf(ios::fixed);
	cout.precision(10);
	solve();

	return 0;
}

 

Compiler output:
a.cc: In function 'bool solve()':
a.cc:61:26: error: expected ';' before 'cout'
   61 |         cout<< ans<< endl
      |                          ^
      |                          ;
   62 |         cout<< ans2<< endl;
      |         ~~~~
Language: C++

#include<iostream>
#define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y]
using namespace std;

int main(){

	int x, y, size;
	int cloth[10][10];
	int count, max;
	
	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j)
		cloth[i][j] = 0;

	while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
		if (size == 1){
			DROP(x, y);
			DROP(x + 1, y);
			DROP(x, y + 1);
			DROP(x - 1, y);
			DROP(x, y - 1);
		}

		else if (size == 2){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
		}

		else if (size == 3){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
			DROP(x + 2, y);
			DROP(x - 2, y);
			DROP(x, y + 2);
			DROP(x, y - 2);
		}
	}

	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j){
		if (cloth[i][j] == 0)++count;
		if (cloth[i][j] > max)max = cloth[i][j];
	}

	cout << count << endl << max << endl;

	



}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   15 |         while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
      |                ^~~~~~~
      |                scanf
Language: C++

#include<iostream>
#include<stdio.h>
#define DROP(x,y) if(x>=0&&y>=0&&x<10&&y<10)++cloth[x][y]
using namespace std;

int main(){

	int x, y, size;
	int cloth[10][10];
	int count, max;
	
	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j)
		cloth[i][j] = 0;

	while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
		if (size == 1){
			DROP(x, y);
			DROP(x + 1, y);
			DROP(x, y + 1);
			DROP(x - 1, y);
			DROP(x, y - 1);
		}

		else if (size == 2){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
		}

		else if (size == 3){
			DROP(x, y);
			DROP(x, y - 1);
			DROP(x, y + 1);
			DROP(x - 1, y - 1);
			DROP(x - 1, y);
			DROP(x - 1, y + 1);
			DROP(x + 1, y - 1);
			DROP(x + 1, y);
			DROP(x + 1, y + 1);
			DROP(x + 2, y);
			DROP(x - 2, y);
			DROP(x, y + 2);
			DROP(x, y - 2);
		}
	}

	for (int i = 0; i < 10; ++i)
	for (int j = 0; j < 10; ++j){
		if (cloth[i][j] == 0)++count;
		if (cloth[i][j] > max)max = cloth[i][j];
	}

	cout << count << endl << max << endl;

	



}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |         while (scanf_s("%d,%d,%d", &x, &y, &size) + 1){
      |                ^~~~~~~
      |                scanf
Language: C++

#include<iostream>
#include<stdio.h>
using namespace std;
int main(){
	int a[10][10]={},x,y,size,dumy=0max=0,ans=0;
	int mx[12]={0,-1,1,0,-1,1,-1,1,0,-2,2,0},my[12]={-1,0,0,1,-1,-1,1,1,-2,0,0,2};
	while(scanf("%d,%d,%d",&x,&y,&size)!=EOF){
		dumy=4*size;
		//cout<<size<<endl;
		for(int i=0;i<dumy;i++){
			if(x+mx[i]>=0&&y+my[i]>=0)
			a[x+mx[i]][y+my[i]]++;
		}
	}
	for(int i=0;i<10;i++){
		for(int j=0;j<10;j++){
			if(a[i][j]==0){
				ans++;
			}else{
				if(max<=a[i][j])
				max=a[i][j];
			}
		}
	}
	cout<<ans<<endl<<max<<endl;
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:40: error: unable to find numeric literal operator 'operator""max'
    5 |         int a[10][10]={},x,y,size,dumy=0max=0,ans=0;
      |                                        ^~~~
a.cc:18:33: error: 'ans' was not declared in this scope; did you mean 'abs'?
   18 |                                 ans++;
      |                                 ^~~
      |                                 abs
a.cc:20:39: error: invalid operands of types '<unresolved overloaded function type>' and 'int' to binary 'operator<='
   20 |                                 if(max<=a[i][j])
      |                                    ~~~^~~~~~~~~
a.cc:21:43: error: overloaded function with no contextual type information
   21 |                                 max=a[i][j];
      |                                           ^
a.cc:25:15: error: 'ans' was not declared in this scope; did you mean 'abs'?
   25 |         cout<<ans<<endl<<max<<endl;
      |               ^~~
      |               abs
Language: C++

#include<iostream>
#include<cstdio>
#include<algorithm>

using namespace std;

int grid[14][14] = { 0 };

void small(int x, int y){
	grid[x][y]++;
	grid[x - 1][y]++;
	grid[x + 1][y]++;
	grid[x][y - 1]++;
	grid[x][y + 1]++;
}

void medium(int x, int y){
	small(x, y);
	grid[x - 1][y - 1]++;
	grid[x + 1][y - 1]++;
	grid[x - 1][y + 1]++;
	grid[x + 1][y + 1]++;
}

void large(int x, int y){
	medium(x, y);
	grid[x - 2][y]++;
	grid[x + 2][y]++;
	grid[x][y - 2]++;
	grid[x][y + 2]++;
}

int main(){
	int x, y, size;
	
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		if (size == 1) small(x + 2, y + 2);
		else if (size == 2) medium(x + 2, y + 2);
		else if (size == 3) large(x + 2, y + 2);
	}

	int ans1 = 0;
	int ans2 = 0;

	for (int i = 2; i < 12; i++){
		for (int j = 2; j < 12; j++){
			if (grid[i][j] == 0)
				ans1++;
			else
				ans2 = max(ans2, grid[i][j]);
		}
	}

	printf("%d\n%d\n", ans1, ans2);

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:36:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   36 |         while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
      |                ^~~~~~~
      |                scanf
Language: C++

#include <iostream>
#include <algorithm>
#define MAX 30
using namespace std;


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:16:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   16 |         while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
      |                ^~~~~~~
      |                scanf
Language: C++

#include <iostream>
#include <algorithm>
#include <cstdio>
#define MAX 30
using namespace std;


int main()
{
	int p[MAX][MAX];
	for (int i = 0; i < MAX; i++){
		for (int j = 0; j < MAX; j++){
			p[i][j] = 0;
		}
	}
	int x, y, size;
	while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
		x += 10;
		y += 10;
		p[x][y]++;
		p[x - 1][y]++;
		p[x + 1][y]++;
		p[x][y - 1]++;
		p[x][y + 1]++;
		if (size == 1){
			continue;
		}
		p[x - 1][y - 1]++;
		p[x - 1][y + 1]++;
		p[x + 1][y - 1]++;
		p[x + 1][y + 1]++;
		if (size == 2){
			continue;
		}
		p[x - 2][y]++;
		p[x + 2][y]++;
		p[x][y - 2]++;
		p[x][y + 2]++;
	}
	int clean = 0, ink = 0;
	for (int i = 10; i < 20; i++){
		for (int j = 10; j < 20; j++){
			if (p[i][j] == 0){
				clean++;
			}
			ink = max(ink, p[i][j]);
		}
	}
	cout << clean << endl;
	cout << ink << endl;

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'?
   17 |         while (scanf_s("%d,%d,%d", &x, &y, &size) != EOF){
      |                ^~~~~~~
      |                scanf
Language: Java

import java.util.Scanner;

public class MyClass{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        
        
        String[] w = {"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"};
        int[] d = {31,29,31,30,31,30,31,31,30,31,30,31};
        int sum = 0;
        
        while(true){
            sum = 0;
        	int a = sc.nextInt();
        	int b = sc.nextInt();
            
            if(a ==0 && b == 0){
               	break;
            }
            
        	for(int i = 0;i < a-1; i++){
         		sum += d[i];
        	}
            
        	sum = sum + b;
            
         
       		System.out.println( w[sum % 7]);
            
    	}
	}
}
        


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

import java.io.*;
import java.util.*;
public class Tmp{
	public static void main(String[] args)throws IOException{
		//BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		Scanner reader=new Scanner(System.in);
		//int in=reader.nextInt();
		int[] tmp={31,29,31,30,31,30,31,31,30,30,30,31};
		String[] ans={"Wednesday","Thursday","Friday","Saturday","Sunday","Monday","Tuesday"};
		int a,b;
		while(true){
			a=reader.nextInt();
			b=reader.nextInt();
			if(a==0&&b==0)break;
			int h=1;
			int co=0;
			while(h!=a){
				co+=tmp[h-1];
				h++;
			}
			co+=b;
			System.out.println(ans[co%7]);
		}	
	}
}

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

import java.util.*;

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

	public static void main(String[] args){

		while(scan.hasNext()){
			int mon = scan.nextInt();
			int day = scan.nextInt();
			if(mon == 0){
				break;
			}
			int year = 2004;
			Calendar cal = Calendar.getInstance();
			cal.set(2004, mon - 1, day);
			int week = cal.get(Calendar.DAY_OF_WEEK);
			String s = "";
			switch(week){
				case Calendar.SUNDAY :
					s = "Sunday";
					break;
				case Calendar.MONDAY :
					s = "Monday";
					break;
				case Calendar.TUESDAY :
					s = "Tuesday";
					break;
				case Calendar.WEDNESDAY :
					s = "Wednesday";
					break;
				case Calendar.THURSDAY :
					s = "Thursday";
					break;
				case Calendar.FRIDAY :
					s = "Friday";
					break;
				case Calendar.SATURDAY :
					s = "Saturday";
					break;
				default :
					break;
			}
			System.out.printf("%s\n", s);
		}
}

Compiler output:
Main.java:46: error: reached end of file while parsing
}
 ^
1 error
Language: Java

import java.util.*;

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

	public static void main(String[] args){

		while(scan.hasNext()){
			int year = 2004;
			int mon = scan.nextInt();
			int dat = scan.nextInt();
			Calendar cal = Calendar.getInstance();
			cal.set(2004, mon - 1, day);
			int week = cal.get(Calendar.DAY_OF_WEEK);
			String s = "";
			switch(week){
				case Calendar.SUNDAY :
					s = "Sunday";
					break;
				case Calendar.MONDAY :
					s = "Monday";
					break;
				case Calendar.TUESDAY :
					s = "Tuesday";
					break;
				case Calendar.WEDNESDAY :
					s = "Wednesday";
					break;
				case Calendar.THURSDAY :
					s = "Thursday";
					break;
				case Calendar.FRIDAY :
					s = "Friday";
					break;
				case Calender.SATURDAY :
					s = "Saturday";
					break;
				default :
					break;
			}
			System.out.printf("%s\n", s);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			cal.set(2004, mon - 1, day);
			                       ^
  symbol:   variable day
  location: class Main
Main.java:35: error: package Calender does not exist
				case Calender.SATURDAY :
				             ^
2 errors
Language: C

#include <stdio.h>

int main(void)
{
	int date[12][31];
	int d;
	int i, j;
	int day;
	
	day = 5;
	for (i = 0; i < 12; i++){
		switch (i + 1){
		  case 1:
			d = 31;
			break;
			
		  case 3:
		  	d = 31;
			break;
			
		  case 5:
		  	d = 31;
			break;
			
		  case 7:
		  	d = 31;
			break;
			
		  case 8:
		  	d = 31;
			break;
			
		  case 10:
		  	d = 31;
			break;
			
		  case 12:
		  	d = 31;
			break;
			
		  case 4:
		  	d = 30;
			break;
			
		  case 6:
		  	d = 30;
			break;
			
		  case 9:
		  	d = 30;
			break;
			
		  case 11:
		  	d = 30;
			break;
		  case 2:
		  	d = 29;
			break;
			
		}
		for (j = 0; j < d; j++){
			date[i][j] = day;
			day++;
			if (day > 7){
				day = 1;
			}
		}
	}
	while (scanf("%d %d", &i, &j) i != 0 && j != 0){
		switch (date[i - 1][j - 1]){
		  case 1:
		  	printf("Sunday\n");
			break;
			
		  case 2:
		  	printf("Monday\n");
			break;
			
		  case 3:
		  	printf("Tuesday\n");
			break;
			
		  case 4:
		  	printf("Wednesday\n");
			break;
			
		  case 5:
			printf("Thursday\n");
			break;
			
		  case 6:
		  	printf("Friday\n");
			break;
			
		  case 7:
		  	printf("Saturday\n");
			break;
		}
	}
	
	return (0);
}

Compiler output:
main.c: In function 'main':
main.c:69:38: error: expected ')' before 'i'
   69 |         while (scanf("%d %d", &i, &j) i != 0 && j != 0){
      |               ~                      ^~
      |                                      )
Language: C

#include<stdio.h>
main(){
  int mon[12],month,day,day2,i,j;
  for(i=0;i<12;i++){
    if(i==2){
      mon[i]=29;
    }
    if(i==1 || i==3 || i==5 || i==7 || i==8 || i==10 || i==12){
      mon[i]=31;
    }
    else{
      mon[i]=30;
    }
  while(1){
    scanf("%d %d",&month,&day);
    if(month==0 && day==0){
      break;
    }
    day2=0;
    for(i=2;i<month+1;i++){
      day2+=mon[i-2];
    }
    day2+=day;
    day2%=7;
    if(day2==1){
      printf("Thursday\n");
    }
    else if(day2==2){
      printf("Friday\n");
    }
    else if(day2==3){
      printf("Saturday\n");
    }
    else if(day2==4){
      printf("Sunday\n");
    }
     else if(day2==5){
      printf("Monday\n");
    }
    else if(day2==6){
      printf("Tuesday\n");
    }
    else if(day2==0){
      printf("Wednesday\n");
    }
  }
  return 0;
}

Compiler output:
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(){
      | ^~~~
main.c: In function 'main':
main.c:48:1: error: expected declaration or statement at end of input
   48 | }
      | ^
Language: C

#include <stdio.h>

int main(){
int mon,day;

while(1){
	scanf("%d%d",&mon,&day);
	if(!mon&&!day)break;
	
	t=0;
	for(i=1;i<mon;i++){
		if(i==2)t+=29;
		else if(i==4||i==6||i==9||i==11)t+=30;
		else t+=31;
	}
	t+=day;
	
	switch(t%7){
	case 0:
		printf("Wednesday\n");
		break;
		
	case 1:
		printf("Thursday\n");
		break;
		
	case 2:
		printf("Friday\n");
		break;
		
	case 3:
		printf("Saturday\n");
		break;
	
	case 4:
		printf("Sunday\n");
		break;
	
	case 5:
		printf("Monday\n");
		break;
	
	case 6:
		printf("Tuesday\n");
		break;
	
	}
}
}
return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:9: error: 't' undeclared (first use in this function)
   10 |         t=0;
      |         ^
main.c:10:9: note: each undeclared identifier is reported only once for each function it appears in
main.c:11:13: error: 'i' undeclared (first use in this function)
   11 |         for(i=1;i<mon;i++){
      |             ^
main.c: At top level:
main.c:50:1: error: expected identifier or '(' before 'return'
   50 | return 0;
      | ^~~~~~
main.c:51:1: error: expected identifier or '(' before '}' token
   51 | }
      | ^
Language: C

#include <stdio.h>

int main(){
	int m,day,date;
	int a[]={0,31,29,31,30,31,30,31,31,30,31,30,31};
	int i,j,k;
	while(1){
		date=2;
		b=1;
		scanf("%d %d",&m,&day);
		if(m==0&&day==0)break;
		for(i=1; i<=12; i++){
			for(j=1; j<=a[i]; j++){
				date=(date+1)%7;
				printf(" month:%2d day:%2d date:%2d\n",i,j,date);
				if(j==day&&i==m){
					b=0;
					break;
				}
			}
			if(!b)break;
		}
		if(date==0)printf("Monday\n");
		else if(date==1)printf("Tuesday\n");
		else if(date==2)printf("Wednesday\n");
		else if(date==3)printf("Thursday\n");
		else if(date==4)printf("Friday\n");
		else if(date==5)printf("Saturday\n");
		else if(date==6)printf("Sunday\n");
	}

	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:9:17: error: 'b' undeclared (first use in this function)
    9 |                 b=1;
      |                 ^
main.c:9:17: note: each undeclared identifier is reported only once for each function it appears in
Language: C

// ConsoleApplication2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#define _CRT_SECURE_NO_WARNINGS 1


#include "stdafx.h"
#include<string.h>

int _tmain(int argc, _TCHAR* argv[])
{
	char you[8][15];
	int a,b,x,y=0,z;
	strcpy (you[5],"Monday");
	strcpy (you[6],"Tuesday");
	strcpy (you[0],"Wednesday");
	strcpy (you[1],"Thursday");
	strcpy (you[2],"Friday");
	strcpy (you[3],"Saturday");
	strcpy (you[4],"Sunday");
	while(scanf("%d %d",&a,&b),a+b!=0){
		if(a==1){
			x=b%7;
		}
		else if(a==2){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==3){
			y+=29;
			x=(y+b)%7;
		}
		else if(a==4){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==5){
			y+=30;
			x=(y+b)%7;
		}
		else if(a==6){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==7){
			y+=30;
			x=(y+b)%7;
		}
		else if(a==8){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==9){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==10){
			y+=30;
			x=(y+b)%7;
		}
		else if(a==11){
			y+=31;
			x=(y+b)%7;
		}
		else if(a==12){
			y+=30;
			x=(y+b)%7;
		}
		printf("%s\n",you[x]);
		y=0;
	}
	return 0;
}

Compiler output:
main.c:6:10: fatal error: stdafx.h: No such file or directory
    6 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

// ConsoleApplication2.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//
#define _CRT_SECURE_NO_WARNINGS 1


#include "stdafx.h"
#include<string.h>

int _tmain(int argc, _TCHAR* argv[])
{
	char you[8][15];
	int a,b,x,y=0,z;
	strcpy (you[5],"Monday");
	strcpy (you[6],"Tuesday");
	strcpy (you[0],"Wednesday");
	strcpy (you[1],"Thursday");
	strcpy (you[2],"Friday");
	strcpy (you[3],"Saturday");
	strcpy (you[4],"Sunday");
	while(scanf("%d %d",&a,&b),a+b!=0){
		if(a==1)
			x=b%7;
		y+=31;
		if(a==2)
			x=(y+b)%7;
		y+=29;
		if(a==3)
			x=(y+b)%7;
		y+=31;
		if(a==4)
			x=(y+b)%7;
		y+=30;
		if(a==5)
			x=(y+b)%7;
		y+=31;
		if(a==6)
			x=(y+b)%7;
		y+=30;
		if(a==7)
			x=(y+b)%7;
		y+=31;
		if(a==8)
			x=(y+b)%7;
		y+=31;
		if(a==9)
			x=(y+b)%7;
		y+=30;
		if(a==10)
			x=(y+b)%7;
		y+=31;
		if(a==11)
			x=(y+b)%7;
		y+=30;
		if(a==12)
			x=(y+b)%7;
		printf("%s\n",you[x]);
		y=0;
	}
	return 0;
}

Compiler output:
main.c:6:10: fatal error: stdafx.h: No such file or directory
    6 | #include "stdafx.h"
      |          ^~~~~~~~~~
compilation terminated.
Language: C

http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0027


Compiler output:
main.c:1:5: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
    1 | http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0027
      |     ^
Language: C

m,s[]={0,31,60,91,121,152,182,213,244,274,305,335};
main(d){char a[7][9]={"Thurs","Fri","Satur","Sun","Mon","Tues","Wednes"};
  while(1)
    {
      scanf("%d%d",&m,&d);
      if(!m)exit(0);
      d+=s[m-1];
      printf("%sday\n",&a[(d%7)?(d%7-1)][0]:6);
    }
}

Compiler output:
main.c:1:1: warning: data definition has no type or storage class
    1 | m,s[]={0,31,60,91,121,152,182,213,244,274,305,335};
      | ^
main.c:1:1: error: type defaults to 'int' in declaration of 'm' [-Wimplicit-int]
main.c:1:3: error: type defaults to 'int' in declaration of 's' [-Wimplicit-int]
    1 | m,s[]={0,31,60,91,121,152,182,213,244,274,305,335};
      |   ^
main.c:2:1: error: return type defaults to 'int' [-Wimplicit-int]
    2 | main(d){char a[7][9]={"Thurs","Fri","Satur","Sun","Mon","Tues","Wednes"};
      | ^~~~
main.c: In function 'main':
main.c:2:1: error: type of 'd' defaults to 'int' [-Wimplicit-int]
main.c:5:7: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    5 |       scanf("%d%d",&m,&d);
      |       ^~~~~
main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf'
  +++ |+#include <stdio.h>
    1 | m,s[]={0,31,60,91,121,152,182,213,244,274,305,335};
main.c:5:7: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch]
    5 |       scanf("%d%d",&m,&d);
      |       ^~~~~
main.c:5:7: note: include '<stdio.h>' or provide a declaration of 'scanf'
main.c:6:13: error: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
    6 |       if(!m)exit(0);
      |             ^~~~
main.c:1:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  +++ |+#include <stdlib.h>
    1 | m,s[]={0,31,60,91,121,152,182,213,244,274,305,335};
main.c:6:13: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
    6 |       if(!m)exit(0);
      |             ^~~~
main.c:6:13: note: include '<stdlib.h>' or provide a declaration of 'exit'
main.c:8:7: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    8 |       printf("%sday\n",&a[(d%7)?(d%7-1)][0]:6);
      |       ^~~~~~
main.c:8:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:7: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch]
main.c:8:7: note: include '<stdio.h>' or provide a declaration of 'printf'
main.c:8:40: error: expected ':' before ']' token
    8 |       printf("%sday\n",&a[(d%7)?(d%7-1)][0]:6);
      |                                        ^
      |                                        :
Language: C

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while ( sc.hasNext() ) {
			int i = 0;
			double in,t,y;
			in = sc.nextDouble();
			t = in / 9.8;
			y = 4.9 * (t*t);
			while ( 5*i-5<y ) i++;
			System.out.println(i);
		}
	}
}

Compiler output:
main.c:1:1: error: unknown type name 'import'
    1 | import java.util.*;
      | ^~~~~~
main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    1 | import java.util.*;
      |            ^
main.c:3:1: error: unknown type name 'public'
    3 | public class Main {
      | ^~~~~~
main.c:3:14: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'Main'
    3 | public class Main {
      |              ^~~~
Language: C

#include <iostream>

int main(){
	using namespace std;
	while(1){
	int month,day,year = 2004,mod;
	cin >> month >> day;
	if (month==0) break;
	else if (month<=2) {
		month += 12;
		year -= 1;
	}
	int k = year % 100;
	int j = year / 100;
	mod = (day+(((month+1)*26)/10)+k+(k/4)+(j/4)+5*j)%7;
	if (mod == 0) cout << "Saturday" << endl;
	else if (mod == 1) cout << "Sunday" << endl;
	else if (mod == 2) cout << "Monday" << endl;
	else if (mod == 3) cout << "Tuesday" << endl;
	else if (mod == 4) cout << "Wednesday" << endl;
	else if (mod == 5) cout << "Thursday" << endl;
	else if (mod == 6) cout << "Friday" << endl;
	}
	return 0;
}

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


      case 5:
        printf("Monday\n");
        break;

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

  return 0;
}

Compiler output:
main.c:2:7: error: expected identifier or '(' before 'case'
    2 |       case 5:
      |       ^~~~
main.c:4:9: error: expected identifier or '(' before 'break'
    4 |         break;
      |         ^~~~~
main.c:6:7: error: expected identifier or '(' before 'case'
    6 |       case 6:
      |       ^~~~
main.c:8:9: error: expected identifier or '(' before 'break'
    8 |         break;
      |         ^~~~~
main.c:9:5: error: expected identifier or '(' before '}' token
    9 |     }
      |     ^
main.c:10:3: error: expected identifier or '(' before '}' token
   10 |   }
      |   ^
main.c:12:3: error: expected identifier or '(' before 'return'
   12 |   return 0;
      |   ^~~~~~
main.c:13:1: error: expected identifier or '(' before '}' token
   13 | }
      | ^
Language: C

#include <stdio.h>

int main(void){

  int i, j;
  int month, day;
  int daycount = 0;

  while(1){
    daycount = 0;
    scanf("%d", &month);
    scanf("%d", &day);
    if((month == 0) && (day == 0)){
      return 0;
    }


    for(i = 1; i < month; i++){
      if((i == 11) || (i == 4) || (i == 6) || (i == 9)){
        daycount += 30;
      }else if((i == 1) || (i == 3) || (i == 5) || (i == 7) || (i == 8) ||\ (i == 10) || (i == 12)){
        daycount += 31;
      }else if(i == 2){
        daycount += 29;
      }
    }

    daycount += day;

    daycount = daycount % 7;

    if(daycount == 0){
      printf("Wednesday\n");
    }else if(daycount == 1){
      printf("Thursday\n");
    }else if(daycount == 2){
      printf("Friday\n");
    }else if(daycount == 3){
      printf("Saturday\n");
    }else if(daycount == 4){
      printf("Sanday\n");
    }else if(daycount == 5){
      printf("Monday\n");
    }else if(daycount == 6){
      printf("Tuesday\n");
    }
 }


  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:21:75: error: stray '\' in program
   21 |       }else if((i == 1) || (i == 3) || (i == 5) || (i == 7) || (i == 8) ||\ (i == 10) || (i == 12)){
      |                                                                           ^
Language: C

#include<stdio.h>

int main(){
	int a[11], day, month, i;
	a[0] = a[2] = a[4] = a[6] = a[7] = a[9] = 31;
	a[1] = 29;
	a[3] = a[5] = a[8] = a[10] = 0;
	while(scanf("%d%d", month, day) !=　0){
		if(month == 0 && day == 0) break;
		for(i = 0; i < month - 1; i++) day += a[i];
		if(day % 7 == 1) printf("Thursday\n");
		if(day % 7 == 2) printf("Friday\n");
		if(day % 7 == 3) printf("Saturday\n");
		if(day % 7 == 4) printf("Sunday\n");
		if(day % 7 == 5) printf("Monday\n");
		if(day % 7 == 6) printf("Tuesday\n");
		if(day % 7 == 0) printf("Wednesday\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:43: error: stray '\343' in program
    8 |         while(scanf("%d%d", month, day) !=<U+3000>0){
      |                                           ^~~~~~~~
Language: C

#include<stdio.h>

int main(){
	int a[11], day, month, i;
	a[0] = 31;
	a[2] = 31;
	a[4] = 31;
	a[6] = 31;
	a[7] = 31;
	a[9] = 31;
	a[1] = 29;
	a[3] = 30;
	a[5] = 30;
	a[8] = 30;
	a[10] = 30;
	while(scanf("%d%d", month, day) !=　0){
		if(month == 0 && day == 0) break;
		for(i = 0; i < month - 1; i++) day += a[i];
		if(day % 7 == 1) printf("Thursday\n");
		if(day % 7 == 2) printf("Friday\n");
		if(day % 7 == 3) printf("Saturday\n");
		if(day % 7 == 4) printf("Sunday\n");
		if(day % 7 == 5) printf("Monday\n");
		if(day % 7 == 6) printf("Tuesday\n");
		if(day % 7 == 0) printf("Wednesday\n");
	}
	return 0;
}

Compiler output:
main.c: In function 'main':
main.c:16:43: error: stray '\343' in program
   16 |         while(scanf("%d%d", month, day) !=<U+3000>0){
      |                                           ^~~~~~~~
Language: C

#include <stdio.h>

int main () {
    int mo;
    int da;
    int sum = 0;
    int i;
    int array [13] = {0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
    while (1) {
        scanf("%d %d",&mo, &da);
        sum = 0;
        if (mo == 0 && da == 0) {
            break;
        }
        for (i = 1; i < mo; i++) {
            sum += array[i];
        }
        sum += da;
        if (sum % 7 == 0) {
            printf("Wednesday\n");
        }
        else if (sum % 7 == 1) {
            printf("Thursday\n");
        }
        else if (sum % 7 == 2) {
            printf("Friday\n");
        }
        else if (sum % 7 == 3) {
            printf("Saturday\n");
        }
        else if (sum % 7 == 4) {
            printf("Sunday\n");
        }
        else if (sum % 7 == 5) {
            printf("Monday\n");
        }
        else if (sum % 7 == 6) {
            printf("Tuesday\n");
        }
    }
    return 0;

Compiler output:
main.c: In function 'main':
main.c:41:5: error: expected declaration or statement at end of input
   41 |     return 0;
      |     ^~~~~~
Language: C

#include<stdio.h>
 
int main(){
	int i,answer=0,mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	for(i=0;i<12;i++){
		mod[i]=day[i]%7;
	}
	char Date1[]="Wednesday";
	char Date2[]="Thursday";
	char Date3[]="Friday";
	char Date4[]="Saturday";
	char Date5[]="Sunday";
	char Date6[]="Monday";
	char Date7[]="Tuesday";
	while(1){
		for(i=0;i<2;i++){
			scanf("%d",&number[i]);
		}
		if(number[0]==0||number[1]==0){
		break;
		}
			for(i=0;i<number[0]-1;i++){
					answer+=mod[i];
			}
		answer+=number[1]%7;
		answer%=7;
		switch(answer){
			case 0:
			printf("%s\n",Date1);
			break;
			case 1:
			printf("%s\n",Date2);
			break;
			case 2:
			printf("%s\n",Date3);
			break;
			case 3:
			printf("%s\n",Date4);
			break;
			case 4:
			printf("%s\n",Date5);
			break;
			case 5:
			printf("%s\n",Date6);
			break;
			case 6:
			printf("%s\n",Date7);
			break;
		}
}

Compiler output:
main.c: In function 'main':
main.c:17:37: error: 'number' undeclared (first use in this function)
   17 |                         scanf("%d",&number[i]);
      |                                     ^~~~~~
main.c:17:37: note: each undeclared identifier is reported only once for each function it appears in
main.c:50:1: error: expected declaration or statement at end of input
   50 | }
      | ^
Language: C

#include<stdio.h>
 
int main(){
	int i,answer=0,number[2],mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	for(i=0;i<12;i++){
		mod[i]=day[i]%7;
	}
	char Date1[]="Wednesday";
	char Date2[]="Thursday";
	char Date3[]="Friday";
	char Date4[]="Saturday";
	char Date5[]="Sunday";
	char Date6[]="Monday";
	char Date7[]="Tuesday";
	while(1){
		for(i=0;i<2;i++){
			scanf("%d",&number[i]);
		}
		if(number[0]==0||number[1]==0){
		break;
		}
			for(i=0;i<number[0]-1;i++){
					answer+=mod[i];
			}
		answer+=number[1]%7;
		answer%=7;
		switch(answer){
			case 0:
			printf("%s\n",Date1);
			break;
			case 1:
			printf("%s\n",Date2);
			break;
			case 2:
			printf("%s\n",Date3);
			break;
			case 3:
			printf("%s\n",Date4);
			break;
			case 4:
			printf("%s\n",Date5);
			break;
			case 5:
			printf("%s\n",Date6);
			break;
			case 6:
			printf("%s\n",Date7);
			break;
		}
}

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

#include<stdio.h>
 
int main(){
	int i,answer,number[2],mod[12],day[12]={31,29,31,30,31,30,31,31,30,31,30,31};
	for(i=0;i<12;i++){
		mod[i]=day[i]%7;
	}
	char Date1[]="Wednesday";
	char Date2[]="Thursday";
	char Date3[]="Friday";
	char Date4[]="Saturday";
	char Date5[]="Sunday";
	char Date6[]="Monday";
	char Date7[]="Tuesday";
	while(1){
		for(i=0;i<2;i++){
			scanf("%d",&number[i]);
		}
		if(number[0]==0||number[1]==0){
		break;
		}
			for(i=0;i<number[0]-1;i++){
					answer+=mod[i];
			}
		answer+=number[1]%7;
		answer%=7;
		switch(answer){
			case 0:
			printf("%s\n",Date1);
			break;
			case 1:
			printf("%s\n",Date2);
			break;
			case 2:
			printf("%s\n",Date3);
			break;
			case 3:
			printf("%s\n",Date4);
			break;
			case 4:
			printf("%s\n",Date5);
			break;
			case 5:
			printf("%s\n",Date6);
			break;
			case 6:
			printf("%s\n",Date7);
			break;
		}
		return 0;
}

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

#include<stdio.h>
 
int main(){
	int i,answer=0,number1=0,number2=0,mod[12],day[12]={28,31,29,31,30,31,30,31,31,30,31,30};
	for(i=0;i<12;i++){
		mod[i]=day[i]%7;
	}
	char Date1[]="Wednesday";
	char Date2[]="Thursday";
	char Date3[]="Friday";
	char Date4[]="Saturday";
	char Date5[]="Sunday";
	char Date6[]="Monday";
	char Date7[]="Tuesday";
	while(1){
			scanf("%d %d",&number1,&number2);
		if(number[0]==0&&number[1]==0){
		break;
		}
			for(i=0;i<number1;i++){
					answer=answer+mod[i];
			}
		answer+=number2;
		answer%=7;
		switch(answer){
			case 0:
			printf("%s\n",Date1);
			break;
			case 1:
			printf("%s\n",Date2);
			break;
			case 2:
			printf("%s\n",Date3);
			break;
			case 3:
			printf("%s\n",Date4);
			break;
			case 4:
			printf("%s\n",Date5);
			break;
			case 5:
			printf("%s\n",Date6);
			break;
			case 6:
			printf("%s\n",Date7);
			break;
		
	}
		return 0;
}

Compiler output:
main.c: In function 'main':
main.c:17:20: error: 'number' undeclared (first use in this function); did you mean 'number2'?
   17 |                 if(number[0]==0&&number[1]==0){
      |                    ^~~~~~
      |                    number2
main.c:17:20: note: each undeclared identifier is reported only once for each function it appears in
main.c:50:1: error: expected declaration or statement at end of input
   50 | }
      | ^
Language: C

#include<iostream>
using namespace std;
int main(){
  int m,d;
  while(cin >> m >> d){
    if(m==0)
      break;
    int cd=d;
    for(int i=1;i<=m;i++){
      switch(i){
      case 2:cd+=31;break;
      case 3:cd+=29;break;
      case 4:cd+=31;break;
      case 5:cd+=30;break;
      case 6:cd+=31;break;
      case 7:cd+=30;break;
      case 8:cd+=31;break;
      case 9:cd+=31;break;
      case 10:cd+=30;break;
      case 11:cd+=31;break;
      case 12:cd+=30;break;
      }
    }
    switch(cd%7){
    case 0:cout << "Wednesday" << endl;break;
    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;
    }

  }



}

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

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

int day[12] = {31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
string date[7] = {
    "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"
};

int main() {
    int m, d;
    while (cin >> m >> d, m && d) {
        int t = d + accumulate(day, day + m - 1, 0);
        cout << date[(t + 2) % 7] << endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:21: error: 'accumulate' was not declared in this scope
   14 |         int t = d + accumulate(day, day + m - 1, 0);
      |                     ^~~~~~~~~~
Language: C++

#include<stdio.h>
int main()
{
int p[12]={31,29,31,30,31,30,31,31,30,31,30,31};
int M,D,sum;
while(1)
{
sum=0;
scanf("%d %d",&M,&D);
if(M==0)break;
for(int i=0;i<M;i++);
sum+=p[i];

sum+=D;

switch(sum%d)
{
case 0:
printf("Sunday\n");
case 1:
printf("Monday\n");

case 2:
printf("Tuesday\n");

case 3:
printf("Wednesday\n");

case 4:
printf("Tursday\n");

case 5:
printf("Friday\n");

case 6:
printf("Saturday\n");
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:8: error: 'i' was not declared in this scope
   12 | sum+=p[i];
      |        ^
a.cc:16:12: error: 'd' was not declared in this scope
   16 | switch(sum%d)
      |            ^
Language: C++

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

double r(double x1,double y1,double x2,double y2){
	return sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
	
	}

int main() {
	// your code goes here
int a[13];
a[1]=31;
a[2]=29;
a[3]=31;
a[4]=30;
a[5]=31;
a[6]=30;
a[7]=31;
a[8]=31;
a[9]=30;
a[10]=31;
a[11]=30;
a[12]=31;

int m,d,z,y;
cin>>m>>d;
while(m!=0){
	if(m==0) z=d;
	else{
		z=d;
		for(int i=1;i<m;i++){
			z=z+a[i];
		}
	}
	y=z%7;
	if(y==1){
		cout<<"Thursday"<<endl;
	}
		if(y==2){
		cout<<"Friday"<<endl;
	}
		if(y==3){
		cout<<"Saturday"<<endl;
	}
		if(y==4){
		cout<<"Sunday"<<endl;
	}
		if(y==5){
		cout<<"Monday"<<endl;
	}
		if(y==6){
		cout<<"Tuesday"<<endl;
	}
		if(y==0){
		cout<<"Wednesday"<<endl;
	}

Compiler output:
a.cc: In function 'int main()':
a.cc:59:10: error: expected '}' at end of input
   59 |         }
      |          ^
a.cc:30:12: note: to match this '{'
   30 | while(m!=0){
      |            ^
a.cc:59:10: error: expected '}' at end of input
   59 |         }
      |          ^
a.cc:12:12: note: to match this '{'
   12 | int main() {
      |            ^
Language: C++


import sys
import math

dayy = [0, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]

def days(a, day):
    if a == 0:
        return day
    else:
        return days(a-1, day + dayy[a])


while 1:
    inp = raw_input().split()
    ii = int(inp[0])
    jj = int(inp[1])
    if ii == 0 and jj== 0:
        break
    ans = days(ii-1, 0) + jj
    ans = ans % 7
    if ans == 1:
        print "Thursday"
        continue
    if ans == 2:
        print "Friday"
        continue
    if ans == 3:
        print "Saturday"
        continue
    if ans == 4:
        print "Sunday"
        continue
    if ans == 5:
        print "Monday"
        continue
    if ans == 6:
        print "Tuesday"
        continue
    if ans == 0:
        print "Wednesday"
        continue

Compiler output:
a.cc:2:1: error: 'import' does not name a type
    2 | import sys
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int month[12];

	month[0]=31;
	month[1]=29;
	month[2]=31;
	month[3]=30;
	month[4]=31;
	month[5]=30;
	month[6]=31;
	month[7]=31;
	month[8]=30;
	month[9]=31;
	month[10]=30;
	month[11]=31;

	int hoge,fuge;

	cin >> hoge >> fuga;

	int i;
	int count=0;

	if(hoge!=0)
	{
		for(i=0;i<hoge-1;i++)
		{
			count+=month[i];
		}	
		
		count+=fuga;
	
		flag = count % 7;
		if(flag==0)
		{
			cout << "Wednesday" <<endl;
		}
		if(fkag==1)
		{
			cout << "Thursday" <<endl;
		}
		if(fkag==2)
		{
			cout << "Friday" <<endl;
		}
		if(fkag==3)
		{
			cout << "Saturday" <<endl;
		}
		if(fkag==4)
		{
			cout << "Sunday" <<endl;
		}
		if(fkag==5)
		{
			cout << "Monday" <<endl;
		}
		if(fkag==6)
		{
			cout << "Tuesday" <<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'fuga' was not declared in this scope; did you mean 'fuge'?
   24 |         cin >> hoge >> fuga;
      |                        ^~~~
      |                        fuge
a.cc:38:17: error: 'flag' was not declared in this scope
   38 |                 flag = count % 7;
      |                 ^~~~
a.cc:43:20: error: 'fkag' was not declared in this scope
   43 |                 if(fkag==1)
      |                    ^~~~
a.cc:47:20: error: 'fkag' was not declared in this scope
   47 |                 if(fkag==2)
      |                    ^~~~
a.cc:51:20: error: 'fkag' was not declared in this scope
   51 |                 if(fkag==3)
      |                    ^~~~
a.cc:55:20: error: 'fkag' was not declared in this scope
   55 |                 if(fkag==4)
      |                    ^~~~
a.cc:59:20: error: 'fkag' was not declared in this scope
   59 |                 if(fkag==5)
      |                    ^~~~
a.cc:63:20: error: 'fkag' was not declared in this scope
   63 |                 if(fkag==6)
      |                    ^~~~
Language: C++

#include<iostream>

using namespace std;

int main()
{
	int month[12];

	month[0]=31;
	month[1]=29;
	month[2]=31;
	month[3]=30;
	month[4]=31;
	month[5]=30;
	month[6]=31;
	month[7]=31;
	month[8]=30;
	month[9]=31;
	month[10]=30;
	month[11]=31;

	int hoge,fuge;

	cin >> hoge >> fuga;

	int i;
	int count=0;

	if(hoge!=0)
	{
		for(i=0;i<hoge-1;i++)
		{
			count+=month[i];
		}	
		
		count+=fuga;

		int flag = 0;
	
		flag = count % 7;
		if(flag==0)
		{
			cout << "Wednesday" <<endl;
		}
		if(flag==1)
		{
			cout << "Thursday" <<endl;
		}
		if(flag==2)
		{
			cout << "Friday" <<endl;
		}
		if(flag==3)
		{
			cout << "Saturday" <<endl;
		}
		if(flag==4)
		{
			cout << "Sunday" <<endl;
		}
		if(flag==5)
		{
			cout << "Monday" <<endl;
		}
		if(flag==6)
		{
			cout << "Tuesday" <<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:24: error: 'fuga' was not declared in this scope; did you mean 'fuge'?
   24 |         cin >> hoge >> fuga;
      |                        ^~~~
      |                        fuge
Language: C++

#include<cstdio>

int main(){
	int a[] = {0,0,31,60,91,121,152,182,213,244,274,305,335,366};
	int m, d;
	char day[7][10] = {"Monday", "Tuesday", "Wednesday", "Thursday","Friday","Saturday","Sunday"};
	scanf("%d %d", &m, &d
	while(m || d){
		printf("%s\n", day[(a[m] + d + 2) % 7]);
		scanf("%d %d", &m, &d
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:30: error: expected ')' before 'while'
    7 |         scanf("%d %d", &m, &d
      |              ~               ^
      |                              )
    8 |         while(m || d){
      |         ~~~~~
Language: C++

int zeller(int y , int m , int d){
	if(m==1 || m==2) m+=12; y-=1;
	return(y + y/4 - y/100 + y/400 + ((13*m+8)/5) + d )%7;
}

int main(){
	int m , d , w=4 , fw;
	while (cin >> m >> d, m){
		switch(zeller(2004,m,d)){
			case 0:
			cout << "Sunday" << endl;
			break;
			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;
		}
	}
	return 0; 
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:16: error: 'cin' was not declared in this scope
    8 |         while (cin >> m >> d, m){
      |                ^~~
a.cc:11:25: error: 'cout' was not declared in this scope
   11 |                         cout << "Sunday" << endl;
      |                         ^~~~
a.cc:11:45: error: 'endl' was not declared in this scope
   11 |                         cout << "Sunday" << endl;
      |                                             ^~~~
Language: C++

int main()
{
	char yobi[7][10]={"Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"};
	int month,day;
	while(1){
		scanf("%d %d",&month,&day);
		if(month==0)
			break;
		for(int i=0;i<month;i++){
			switch(i){
				case 2:
					day+=29;
				case 4:
				case 6:
				case 9:
				case 11:
					day+=30;
				default:
					day+=31;
			}
		}
		printf("%s\n",yobi[day%7]);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:17: error: 'scanf' was not declared in this scope
    6 |                 scanf("%d %d",&month,&day);
      |                 ^~~~~
a.cc:22:17: error: 'printf' was not declared in this scope
   22 |                 printf("%s\n",yobi[day%7]);
      |                 ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int main()
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
a.cc:15:17: error: 'Monday' was not declared in this scope
   15 |         cout << Monday;
      |                 ^~~~~~
a.cc:18:17: error: 'Tuesday' was not declared in this scope
   18 |         cout << Tuesday;
      |                 ^~~~~~~
a.cc:21:17: error: 'Wednesday' was not declared in this scope
   21 |         cout << Wednesday;
      |                 ^~~~~~~~~
a.cc:24:17: error: 'Thursday' was not declared in this scope
   24 |         cout << Thursday;
      |                 ^~~~~~~~
a.cc:27:17: error: 'Friday' was not declared in this scope
   27 |         cout << Friday;
      |                 ^~~~~~
a.cc:30:17: error: 'Saturday' was not declared in this scope
   30 |         cout << Saturday;
      |                 ^~~~~~~~
a.cc:33:17: error: 'Sunday' was not declared in this scope
   33 |         cout << Sunday;
      |                 ^~~~~~