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

include<iostream>
using namespace std;
int main(){
  int n;
  cin >> n;
  char tc[n];
  int tn[n];
  for(int i=0;i<n;i++) cin >> tc[i] >> tn[i];
  int s[13];
  int h[13];
  int c[13];
  int d[13];  
for(int i=0;i<13;i++){
    s[i] = i+1;
    h[i] = i+1;
    c[i] = i+1;
    d[i] = i+1;
  }
 for(int i=0;i<4;i++){
for(int j=0;j<13;j++){ 
  if(i==0) cin >> s[j];
  if(i==1) cin >> h[j];
  if(i==2) cin >> c[j];
  if(i==3) cin >> d[j];
 }
  }
 for(int i=0;i<n;i++){
   if(tc[i]=='S'){
     for(int j=0;j<13;j++){
       if(tn[i]==s[j]) s[j] = 0;
     }
   }
   else if(tc[i]=='H'){
     for(int j=0;j<13;j++){
       if(tn[i]==h[j]) h[j] = 0;
     }
   }
   else if(tc[i]=='C'){
     for(int j=0;j<13;j++){
       if(tn[i]==c[j]) c[j] = 0;
     }
   }
   else if(tc[i]=='D'){
     for(int j=0;j<13;j++){
       if(tn[i]==d[j]) d[j] = 0;
     }
   }
 }
   for(int i=0;i<13;i++){
     if(s[i]>0) cout << 'S' << ' ' << s[i] << endl;
   }
 for(int i=0;i<13;i++){
   if(h[i]>0) cout << 'H' << ' ' << h[i] << endl;
 }
 for(int i=0;i<13;i++){
   if(c[i]>0) cout << 'C' << ' ' << c[i] << endl;
 }
 for(int i=0;i<13;i++){
   if(d[i]>0) cout << 'D' << ' ' << d[i] << endl;
   }
 return 0;
 }

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<iostream>
      | ^~~~~~~
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n;
      |   ^~~
a.cc:50:17: error: 'cout' was not declared in this scope
   50 |      if(s[i]>0) cout << 'S' << ' ' << s[i] << endl;
      |                 ^~~~
a.cc:50:47: error: 'endl' was not declared in this scope
   50 |      if(s[i]>0) cout << 'S' << ' ' << s[i] << endl;
      |                                               ^~~~
a.cc:53:15: error: 'cout' was not declared in this scope
   53 |    if(h[i]>0) cout << 'H' << ' ' << h[i] << endl;
      |               ^~~~
a.cc:53:45: error: 'endl' was not declared in this scope
   53 |    if(h[i]>0) cout << 'H' << ' ' << h[i] << endl;
      |                                             ^~~~
a.cc:56:15: error: 'cout' was not declared in this scope
   56 |    if(c[i]>0) cout << 'C' << ' ' << c[i] << endl;
      |               ^~~~
a.cc:56:45: error: 'endl' was not declared in this scope
   56 |    if(c[i]>0) cout << 'C' << ' ' << c[i] << endl;
      |                                             ^~~~
a.cc:59:15: error: 'cout' was not declared in this scope
   59 |    if(d[i]>0) cout << 'D' << ' ' << d[i] << endl;
      |               ^~~~
a.cc:59:45: error: 'endl' was not declared in this scope
   59 |    if(d[i]>0) cout << 'D' << ' ' << d[i] << endl;
      |                                             ^~~~
Language: C++

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

int main()
{
	int card[4][13],markn,number,i,x;
		//0…Sスペード 1…Hハート 2…Cクローバー 3…Dダイヤ
	star mark;

	cin>>x;
	for(i=0;i<x;i++){
		cin>>mark>>number;
		if(mark=="S") markn=0;
		if(mark=="H") markn=1;
		if(mark=="C") markn=2;
		if(mark=="D") markn=3;
		card[mark][number-1]=1;
	}
	for(markn=0;markn<4;mark++){
		if(markn==0) mark="S";
		if(mark==1) markn="H";
		if(mark==2) markn="C";
		if(mark==3) markn="D";
		for(number=0;number<13;number++){
			if(card[markn][number]=0) cout<<mark<<" "<<number+1<<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'star' was not declared in this scope
    9 |         star mark;
      |         ^~~~
a.cc:13:22: error: 'mark' was not declared in this scope; did you mean 'markn'?
   13 |                 cin>>mark>>number;
      |                      ^~~~
      |                      markn
a.cc:20:29: error: 'mark' was not declared in this scope; did you mean 'markn'?
   20 |         for(markn=0;markn<4;mark++){
      |                             ^~~~
      |                             markn
a.cc:22:35: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   22 |                 if(mark==1) markn="H";
      |                                   ^~~
      |                                   |
      |                                   const char*
a.cc:23:35: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   23 |                 if(mark==2) markn="C";
      |                                   ^~~
      |                                   |
      |                                   const char*
a.cc:24:35: error: invalid conversion from 'const char*' to 'int' [-fpermissive]
   24 |                 if(mark==3) markn="D";
      |                                   ^~~
      |                                   |
      |                                   const char*
Language: C++

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

int main()
{
	int card[4][13]={0};
	int markn,number,i,x;
		//0…Sスペード 1…Hハート 2…Cクローバー 3…Dダイヤ
	string mark;

	card=0;

	cin>>x;
	for(i=0;i<x;i++){
		cin>>mark;
		cin>>number;
		if(mark=="S") markn=0;
		if(mark=="H") markn=1;
		if(mark=="C") markn=2;
		if(mark=="D") markn=3;
		card[markn][number-1]=1;
	}
	for(markn=0;markn<4;markn++){
		if(markn==0) mark="S";
		if(markn==1) mark="H";
		if(markn==2) mark="C";
		if(markn==3) mark="D";
		for(number=0;number<13;number++){
			if(card[markn][number]==0) cout<<mark<<" "<<number+1<<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:13: error: incompatible types in assignment of 'int' to 'int [4][13]'
   12 |         card=0;
      |         ~~~~^~
Language: C++

int n,c['Z'][14],p,i,j;
char m[5]="SHCD",s;
main(){
	scanf("%d",&n);
	while(n--){
		scanf(" %c %d",&s,&p);
		c[s][p]=1;
	}
	for(i=0;i<4;i++)
	for(j=1;j<14;j++)c[m[i]][j]?:printf("%c %d\n",m[i],j);
	
return 0;
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:4:9: error: 'scanf' was not declared in this scope
    4 |         scanf("%d",&n);
      |         ^~~~~
a.cc:10:38: error: 'printf' was not declared in this scope
   10 |         for(j=1;j<14;j++)c[m[i]][j]?:printf("%c %d\n",m[i],j);
      |                                      ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | int n,c['Z'][14],p,i,j;
Language: C++

#include <iostream>
using namespace std;


//スペードハートクラブダイヤ
//01234


int main() {
	int card[4][13]; //card[種類][数字]
	int i,j,rank;
	cin <<n;
	char egara;

//入力処理

	for(i=0;i<n;i++){
		cin >> egara >> rank;
		swich(egara) {
		case 'S':
			card[0][rank-1] = 1;
			break;
		case 'H':
			card[1][rank-1] = 1;
			break;
		case 'C':
			card[2][rank-1] = 1;
			break;
		case 'D':
			card[3][rank-1] = 1;
			break;
		}
	}
	
//出力処理

	for(i=0;i<4;i++){
		for(j=0;j<13;j++){
			if (card[i][j] == 0){
				swich(i) {
				case 0:
					cout << "S " << j+1 <<endl;
					break;
				case 1:
					cout << "H " << j+1 <<endl;
					break;
				case 2:
					cout << "C " << j+1 <<endl;
					break;
				case 3:
					cout << "D " << j+1 <<endl;
					break;
				}
			}
		}
	
	
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:15: error: 'n' was not declared in this scope
   12 |         cin <<n;
      |               ^
a.cc:19:17: error: 'swich' was not declared in this scope
   19 |                 swich(egara) {
      |                 ^~~~~
a.cc:40:33: error: 'swich' was not declared in this scope
   40 |                                 swich(i) {
      |                                 ^~~~~
Language: C++

#include <iostream>
using namespace std;
&#160;
int main() {
	int a[4][13];
	for(int k=0;k<4;k++){
		for(int l=0;l<13;l++){
			a[k][l]=0;}
	}
	
	int n,b;		
	char x;
	cin>>n		
	for(int i=0;i<n;i++){
		cin>>x>>b;
	switch(x){
		case 'S':
			a[0][b-1]=1;
			break;
		case 'H':
			a[1][b-1]=1;
			break;
		case 'C':
			a[2][b-1]=1;
			break;
		case 'D':
			a[3][b-1]=1;
			break;
	}
	}
	for(int k=0;k<4;k++){
		for(int l=0;l<13;l++){
			if(a[k][l]==0){
				switch(k)
				case 0:
					cout<<'S'<<' '<<l+1;
					break;
				case 1:
					cout<<'H'<<' '<<l+1;
					break;
				case 2:
					cout<<'C'<<' '<<l+1;
					break;
				case 3:
					cout<<'D'<<' '<<l+1;
					break;
			}
		}
	}
}

Compiler output:
a.cc:3:2: error: stray '#' in program
    3 | &#160;
      |  ^
a.cc:3:3: error: expected unqualified-id before numeric constant
    3 | &#160;
      |   ^~~
a.cc: In function 'int main()':
a.cc:13:16: error: expected ';' before 'for'
   13 |         cin>>n
      |               ^ 
      |                ;
   14 |         for(int i=0;i<n;i++){
      |         ~~~    
a.cc:14:21: error: 'i' was not declared in this scope
   14 |         for(int i=0;i<n;i++){
      |                     ^
a.cc:38:33: error: case label '1' not within a switch statement
   38 |                                 case 1:
      |                                 ^~~~
a.cc:41:33: error: case label '2' not within a switch statement
   41 |                                 case 2:
      |                                 ^~~~
a.cc:44:33: error: case label '3' not within a switch statement
   44 |                                 case 3:
      |                                 ^~~~
Language: C++

using namespace std;

int main()
{
    const char suits[4] = {'S', 'H', 'C', 'D'};
    char suit;
    int num, n_cards;;
    bool cards[4][13] = {};
    cin >> n_cards;
    for (int i = 0; i < n_cards; ++i) {
	cin >> suit >> num;
	switch (suit) {
	case 'S':
	    cards[0][num - 1] = true;
	    break;
	case 'H':
	    cards[1][num - 1] = true;
	    break;
	case 'C':
	    cards[2][num - 1] = true;
	    break;
	case 'D':
	    cards[3][num - 1] = true;
	    break;
	}
    }
    for (int i = 0; i < 4; ++i) {
	for (int j = 0; j < 13; ++j) {
	    if (!cards[i][j])
		cout << suits[i] << ' ' << j + 1 << endl;
	}
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:5: error: 'cin' was not declared in this scope
    9 |     cin >> n_cards;
      |     ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:30:17: error: 'cout' was not declared in this scope
   30 |                 cout << suits[i] << ' ' << j + 1 << endl;
      |                 ^~~~
a.cc:30:17: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:53: error: 'endl' was not declared in this scope
   30 |                 cout << suits[i] << ' ' << j + 1 << endl;
      |                                                     ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
Language: C++

#include <iostream>

using namespace std;

int main() 
{
    int s[14], h[14], c[14], d[14];
    int total, mark, num;

    memset(s, 0, sizeof s);
    memset(h, 0, sizeof h);
    memset(c, 0, sizeof c);
    memset(d, 0, sizeof d);

    cin >> total;
    for (int i=0; i<total; ++i) {
        cin >> mark >> num;
        switch (mark) 
        {
            case 'S':
                s[num] = 1;
                break;
            case 'H':
                h[num] = 1;
                break;
            case 'C':
                c[num] = 1;
                break;
            case 'D':
                d[num] = 1;
                break;
        }
    }

    for (int j=1; j<=13; +j) {
        if (!s[i]) cout << "S " << i << endl;
    }
    for (int j=1; j<=13; +j) {
        if (!h[i]) cout << "H " << i << endl;
    }
    for (int j=1; j<=13; +j) {
        if (!c[i]) cout << "C " << i << endl;
    }
    for (int j=1; j<=13; +j) {
        if (!d[i]) cout << "D " << i << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:5: error: 'memset' was not declared in this scope
   10 |     memset(s, 0, sizeof s);
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | 
a.cc:36:16: error: 'i' was not declared in this scope
   36 |         if (!s[i]) cout << "S " << i << endl;
      |                ^
a.cc:39:16: error: 'i' was not declared in this scope
   39 |         if (!h[i]) cout << "H " << i << endl;
      |                ^
a.cc:42:16: error: 'i' was not declared in this scope
   42 |         if (!c[i]) cout << "C " << i << endl;
      |                ^
a.cc:45:16: error: 'i' was not declared in this scope
   45 |         if (!d[i]) cout << "D " << i << endl;
      |                ^
Language: C++

#include <iostream>

using namespace std;

int main() 
{
    int total, num;
    char mark;

    int s[14], h[14], c[14], d[14];
    memset(s, 0, sizeof s);
    memset(h, 0, sizeof h);
    memset(c, 0, sizeof c);
    memset(d, 0, sizeof d);

    cin >> total;

    for (int i=0; i<total; ++i) {
        cin >> mark >> num;
        switch (mark) 
        {
            case 'S':
                s[num] = 1;
                break;
            case 'H':
                h[num] = 1;
                break;
            case 'C':
                c[num] = 1;
                break;
            case 'D':
                d[num] = 1;
                break;
        }
    }

    for (int i=1; i<=13; ++i) {
        if (!s[i]) cout << "S " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!h[i]) cout << "H " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!c[i]) cout << "C " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!d[i]) cout << "D " << i << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:5: error: 'memset' was not declared in this scope
   11 |     memset(s, 0, sizeof s);
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 |
Language: C++

#include <iostream>
#include <string>

using namespace std;

int main() 
{
    int total, num;
    char mark;

    int s[14], h[14], c[14], d[14];
    memset(s, 0, sizeof s);
    memset(h, 0, sizeof h);
    memset(c, 0, sizeof c);
    memset(d, 0, sizeof d);

    cin >> total;

    for (int i=0; i<total; ++i) {
        cin >> mark >> num;
        switch (mark) 
        {
            case 'S':
                s[num] = 1;
                break;
            case 'H':
                h[num] = 1;
                break;
            case 'C':
                c[num] = 1;
                break;
            case 'D':
                d[num] = 1;
                break;
        }
    }

    for (int i=1; i<=13; ++i) {
        if (!s[i]) cout << "S " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!h[i]) cout << "H " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!c[i]) cout << "C " << i << endl;
    }
    for (int i=1; i<=13; ++i) {
        if (!d[i]) cout << "D " << i << endl;
    }

    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:5: error: 'memset' was not declared in this scope
   12 |     memset(s, 0, sizeof s);
      |     ^~~~~~
a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    1 | #include <iostream>
  +++ |+#include <cstring>
    2 | #include <string>
Language: C++

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

using namespace std;

int main() {

	int a;
	int card[4][13] = {0};
	char kari1;
	int kari2;

	cin >> a;

	for (int i = 0; i < a; i++) {
		cin >> kari1 >> kari2;

		if (kari1 == S) {
			card[0][i] = 1;
		} else if (kari1 == H) {
			card[1][i] = 1;
		} else if (kari1 == C) {
			card[2][i] = 1;
		} else {
			card[3][i] = 1;
		}
	}

	for (int i = 0; i < 4; i++) {
		for (int j = 0; j < 13; j++) {
			if(card[i][j] == 0) {
				if(i == 0) {
					printf("S %d\n", j);
				} else if (i == 1) {
					printf("H %d\n", j);
				} else if (i == 2) {
					printf("C %d\n", j);
				} else {
					printf("D %d\n", j);
				}
			}
		}
	}

	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:30: error: 'S' was not declared in this scope
   18 |                 if (kari1 == S) {
      |                              ^
a.cc:20:37: error: 'H' was not declared in this scope
   20 |                 } else if (kari1 == H) {
      |                                     ^
a.cc:22:37: error: 'C' was not declared in this scope
   22 |                 } else if (kari1 == C) {
      |                                     ^
Language: C++

using namespace std;
int main(){
  int n,bell,s[13]={0},h[13]={0},c[13]={0},d[13]={0};
  char a;
  cin >> n;
  for(int i=0;i<n;i++){
    cin >> a >> bell;
    bell-=1;
    if(a=='S'){
      s[bell]=1;
    }
    else if(a=='H'){
      h[bell]=1;
    }
    else if(a=='C'){
      c[bell]=1;
    }
    else if(a=='D'){
      d[bell]=1;
    }
  }

  for(int i=0;i<13;i++){
    if(s[i]==0){
      cout << "S " << i+1 << endl;
    }
  }
  for(int i=0;i<13;i++){
    if(h[i]==0){
      cout << "H " << i+1 << endl;
    }
  }
  for(int i=0;i<13;i++){
    if(c[i]==0){
      cout << "C " << i+1 << endl;
    }
  }
  for(int i=0;i<13;i++){
    if(d[i]==0){
      cout << "D " << i+1 << endl;
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:3: error: 'cin' was not declared in this scope
    5 |   cin >> n;
      |   ^~~
a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
  +++ |+#include <iostream>
    1 | using namespace std;
a.cc:25:7: error: 'cout' was not declared in this scope
   25 |       cout << "S " << i+1 << endl;
      |       ^~~~
a.cc:25:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:25:30: error: 'endl' was not declared in this scope
   25 |       cout << "S " << i+1 << endl;
      |                              ^~~~
a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
  +++ |+#include <ostream>
    1 | using namespace std;
a.cc:30:7: error: 'cout' was not declared in this scope
   30 |       cout << "H " << i+1 << endl;
      |       ^~~~
a.cc:30:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:30:30: error: 'endl' was not declared in this scope
   30 |       cout << "H " << i+1 << endl;
      |                              ^~~~
a.cc:30:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:35:7: error: 'cout' was not declared in this scope
   35 |       cout << "C " << i+1 << endl;
      |       ^~~~
a.cc:35:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:35:30: error: 'endl' was not declared in this scope
   35 |       cout << "C " << i+1 << endl;
      |                              ^~~~
a.cc:35:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
a.cc:40:7: error: 'cout' was not declared in this scope
   40 |       cout << "D " << i+1 << endl;
      |       ^~~~
a.cc:40:7: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>'
a.cc:40:30: error: 'endl' was not declared in this scope
   40 |       cout << "D " << i+1 << endl;
      |                              ^~~~
a.cc:40:30: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>'
Language: C++

#include <iostream>

using namespace std ;
int main()
{
	int cardm,cardn; //m for max   n for number 
	char mark;
	cin　>> cardm; 
	bool card[3][cardn-1];
	for(int lp=0;lp<cardn;lp++){
		cin >>mark>>cardn;
		if(mark=="S"){
		 card[0][cardn]=true;
		}
		if(mark=="H"){
		card[1][cardn]=true;
	    }
		if(mark=="C"){
	    card[2][cardn]=true;
	    }
		if(mark=="D"){
	    card[3][cardn]=true;
	    }
	}
	for(int lp1=0; lp1<5;lp1++){
		for(int lp2=0; lp2<14; lp2++){
			if(card[lp1][lp2]==false){
				if(lp1==0){
					cout <<"S";
				}
				if(lp==1){
					cout <<"H";
				}
				if(lp==2){
					cout <<"C";
				}
				if(lp==3){
					cout <<"D";
				}
			cout <<lp2;
			}
		
			
		}}
	return 0;
}

Compiler output:
a.cc:8:9: error: extended character 　 is not valid in an identifier
    8 |         cin　>> cardm;
      |         ^
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin\U00003000' was not declared in this scope
    8 |         cin　>> cardm;
      |         ^~~~~
a.cc:12:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |                 if(mark=="S"){
      |                    ~~~~^~~~~
a.cc:15:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   15 |                 if(mark=="H"){
      |                    ~~~~^~~~~
a.cc:18:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   18 |                 if(mark=="C"){
      |                    ~~~~^~~~~
a.cc:21:24: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   21 |                 if(mark=="D"){
      |                    ~~~~^~~~~
a.cc:31:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   31 |                                 if(lp==1){
      |                                    ^~
      |                                    lp2
a.cc:34:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   34 |                                 if(lp==2){
      |                                    ^~
      |                                    lp2
a.cc:37:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   37 |                                 if(lp==3){
      |                                    ^~
      |                                    lp2
Language: C++

#include <iostream>

using namespace std ;
int main()
{
	int cardm,cardn; //m for max   n for number 
	char mark;
	cin　>> cardm; 
	bool card[3][cardn-1];
	for(int lp=0;lp<cardn;lp++){
		cin >>mark>>cardn;
		if(mark=='S'){
		 card[0][cardn]=true;
		}
		if(mark=='H'){
		card[1][cardn]=true;
	    }
		if(mark=='C'){
	    card[2][cardn]=true;
	    }
		if(mark=='D'){
	    card[3][cardn]=true;
	    }
	}
	for(int lp1=0; lp1<5;lp1++){
		for(int lp2=0; lp2<14; lp2++){
			if(card[lp1][lp2]==false){
				if(lp1==0){
					cout <<"S";
				}
				if(lp==1){
					cout <<"H";
				}
				if(lp==2){
					cout <<"C";
				}
				if(lp==3){
					cout <<"D";
				}
			cout <<lp2;
			}
		
			
		}}
	return 0;
}

Compiler output:
a.cc:8:9: error: extended character 　 is not valid in an identifier
    8 |         cin　>> cardm;
      |         ^
a.cc: In function 'int main()':
a.cc:8:9: error: 'cin\U00003000' was not declared in this scope
    8 |         cin　>> cardm;
      |         ^~~~~
a.cc:31:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   31 |                                 if(lp==1){
      |                                    ^~
      |                                    lp2
a.cc:34:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   34 |                                 if(lp==2){
      |                                    ^~
      |                                    lp2
a.cc:37:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   37 |                                 if(lp==3){
      |                                    ^~
      |                                    lp2
Language: C++

#include <iostream>

using namespace std ;
int main()
{
	int cardx,cardn,cardm; //m for max   n for number 
	char mark;
	cin >> cardm; 
	cardm=cardx-1;
	bool card[3][cardm];
	for(int lp=0;lp<cardn;lp++){
		cin >>mark>>cardn;
		if(mark=='S'){
		 card[0][cardn]=true;
		}
		if(mark=='H'){
		card[1][cardn]=true;
	    }
		if(mark=='C'){
	    card[2][cardn]=true;
	    }
		if(mark=='D'){
	    card[3][cardn]=true;
	    }
	}
	for(int lp1=0; lp1<5;lp1++){
		for(int lp2=0; lp2<14; lp2++){
			if(card[lp1][lp2]==false){
				if(lp1==0){
					cout <<"S";
				}
				if(lp==1){
					cout <<"H";
				}
				if(lp==2){
					cout <<"C";
				}
				if(lp==3){
					cout <<"D";
				}
			cout <<lp2;
			}
		
			
		}}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:32:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   32 |                                 if(lp==1){
      |                                    ^~
      |                                    lp2
a.cc:35:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   35 |                                 if(lp==2){
      |                                    ^~
      |                                    lp2
a.cc:38:36: error: 'lp' was not declared in this scope; did you mean 'lp2'?
   38 |                                 if(lp==3){
      |                                    ^~
      |                                    lp2
Language: C++

#include<cstdio>
#include<cstdlib>
#include<cmath>
using namespace std;
#define MAX_N 100

int s[14], h[14], c[14], d[14], n, i, x;
char str[1];

int sort(const void *a, const void *b){
  return *(int*)a - *(int*)b;
}

int main(){
  memset(s, 0, sizeof(s));
  memset(h, 0, sizeof(h));
  memset(c, 0, sizeof(c));
  memset(d, 0, sizeof(d));
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%[SHCD] %d", str, &x);
    if(str[0] == 'S') s[x]++;
    if(str[0] == 'H') h[x]++;
    if(str[0] == 'C') c[x]++;
    if(str[0] == 'D') d[x]++;
  }
  for(i = 1; i <= 13; i++)
    if(s[i] == 0) printf("S %d\n", i);
  for(i = 1; i <= 13; i++)
    if(h[i] == 0) printf("H %d\n", i);
  for(i = 1; i <= 13; i++)
    if(c[i] == 0) printf("C %d\n", i);
  for(i = 1; i <= 13; i++)
    if(d[i] == 0) printf("D %d\n", i);
  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:3: error: 'memset' was not declared in this scope
   15 |   memset(s, 0, sizeof(s));
      |   ^~~~~~
a.cc:4:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>'
    3 | #include<cmath>
  +++ |+#include <cstring>
    4 | using namespace std;
Language: C++

import java.util.*;
public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int [][] card = new int[4][14];
		for(int i = 0; i < n; i++){
			String str = sc.next();
			int x = sc.nextInt();
			if(str.equals("S")){
				card[0][x] = 1;
			}
			else if(str.equals("H")){
				card[1][x] = 1;
			}
			else if(str.equals("C")){
				card[2][x] = 1;
			}
			else {
				card[3][x] = 1;
			}
		}
		for(int i = 0; i < card.length; i++) {
			for(int j = 1; j < card[i].length; j++){
				if(card[i][j] == 0){
					if(i == 0){
						System.out.println("S" + " " + j);
					}
					else if(i == 1){
						System.out.println("H" + " " + j);
					}
					else if(i == 2){
						System.out.println("C" + " " + j);
					}
					else{
						System.out.println("D" + " " + j);
					}
					
				}
			}
		}
			
	}

}

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>
#include<cstdio>
using namespace std;

int main(){
	int n;
	int array[4][13] = {0};
	char a;
	int x;
	cin >> n;
/*テ・ツ?・テ・ツ環?/
	for(int i = 0; i < n; i++){
			cin >> a >> x;
			if(a == 'S'){
				array[0][x-1] = 1;
			}
			else if(a == 'H'){
				array[1][x-1] = 1;
			}
			else if(a == 'C'){
				array[2][x-1] = 1;
			}
			else if(a == 'D'){
				array[3][x-1] = 1;
			}
	}


/*テ・ツ?コテ・ツ環?/
	for(int i = 0; i < 4; i++){
		for(int j = 0; j < 13; j++){
			if(array[i][j] == 0){
				if(i == 0) cout << "S ";
				else if(i == 1) cout << "H ";
				else if(i == 2) cout << "C ";
				else if(i == 3) cout << "D ";

				cout << j + 1 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:11:1: error: unterminated comment
   11 | /*テ・ツ?・テ・ツ環?/
      | ^
a.cc: In function 'int main()':
a.cc:10:18: error: expected '}' at end of input
   10 |         cin >> n;
      |                  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

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

int main(){
	int n;
	int array[4][13] = {0};
	char a;
	int x;
	cin >> n;
/*テ・ツ?・テ・ツ環?/
	for(int i = 0; i < n; i++){
			cin >> a >> x;
			if(a == 'S'){
				array[0][x-1] = 1;
			}
			else if(a == 'H'){
				array[1][x-1] = 1;
			}
			else if(a == 'C'){
				array[2][x-1] = 1;
			}
			else if(a == 'D'){
				array[3][x-1] = 1;
			}
	}


/*テ・ツ?コテ・ツ環?/
	for(int i = 0; i < 4; i++){
		for(int j = 0; j < 13; j++){
			if(array[i][j] == 0){
				if(i == 0) cout << "S ";
				else if(i == 1) cout << "H ";
				else if(i == 2) cout << "C ";
				else if(i == 3) cout << "D ";
				cout << j + 1 << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc:11:1: error: unterminated comment
   11 | /*テ・ツ?・テ・ツ環?/
      | ^
a.cc: In function 'int main()':
a.cc:10:18: error: expected '}' at end of input
   10 |         cin >> n;
      |                  ^
a.cc:5:11: note: to match this '{'
    5 | int main(){
      |           ^
Language: C++

include<stdio.h>
int main(void)
{
  int S[13],H[13],C[13],D[13],n,i,s;
  char e;

  for(i=0;i<13;i++)
    S[i]=0;
  for(i=0;i<13;i++)
    H[i]=0;
  for(i=0;i<13;i++)
    C[i]=0;
  for(i=0;i<13;i++)
    D[i]=0;

  scanf("%d",&n);

  for(i=0;i<=n;i++){
    scanf("%c %d",&e,&s);
    if(e=='S')
      S[s-1]=1;
    else if(e=='H')
      H[s-1]=1;
    else if(e=='C')
      C[s-1]=1;
    else if(e=='D')
      D[s-1]=1;
  }

  printf("\n");

  for(i=0;i<13;i++){
    if(S[i]==0)
      printf("S %d\n",i+1);
  }
  for(i=0;i<13;i++){
    if(H[i]==0)
      printf("H %d\n",i+1);
  }
  for(i=0;i<13;i++){
    if(C[i]==0)
      printf("C %d\n",i+1);
  }
  for(i=0;i<13;i++){
    if(D[i]==0)
      printf("D %d\n",i+1);
  }

  return 0;
}

Compiler output:
a.cc:1:1: error: 'include' does not name a type
    1 | include<stdio.h>
      | ^~~~~~~
Language: C++

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

char card_n(int i){
if (i == 0) return 'S';
if (i == 1) return 'H';
if (i == 2) return 'C';
return 'D';
}
int card_n(char c){
if (c == 'S') return 0;
if (c == 'H') return 1;
if (c == 'C') return 2;
return 3;
}

int main(void){
int data[4][14];
int n, a;
char c;
for (int i = 0; i < 4; i++) for (int j = 0; j < 14; j++)
  data[i][j] = 0;
cin >> n;
while (n--){
cin >> c >> a;
data[card_c(c)][a] = 1;
}
for (int i = 0; i < 4; i++){
for (int j = 1; j < 14; j++){
if (!data[i][j]){
printf("%c %d\n", card_n(i), j);
}
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:6: error: 'card_c' was not declared in this scope; did you mean 'card_n'?
   27 | data[card_c(c)][a] = 1;
      |      ^~~~~~
      |      card_n
Language: Java

import java.util.Scanner;

public class J10016{
	public static void main(String args[]){
		Scanner sc=new Scanner(System.in);
		int m=0,f=0,r=0;
		while(m+f+r!=-3){
			m=sc.nextInt();
			f=sc.nextInt();
			r=sc.nextInt();
			if(m+f+r==-3)continue;
			if(m==-1 || f==-1)System.out.printf("F\n");
			else if(m+f>=80)System.out.printf("A\n");
			else if(m+f<80 && m+f>=65)System.out.printf("B\n");
			else if(m+f<65 && m+f>=50)System.out.printf("C\n");
			else if(m+f<50 && m+f>=30)System.out.printf("%c\n",r>=50?'C':'D');
			else System.out.printf("F\n");
		}
	}
}

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

import java.util.Scanner;
   
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for ( int n = 1; n > 0; n++){ 
int a = sc.nextInt() ;
int b = sc.nextInt() ;
int c = sc.nextInt() ;
if( a < 0 && b < 0 && c < 0){
break;
}
int d = a + b;
if ( a < 0 || b < 0){
System.out.println("F");
}else{
switch(d){
case(d => 80);
System.out.println("A");
break;
case(d => 65 && d < 80);
System.out.println("B");
break;
case(d => 50 && d < 65);
System.out.println("C");
break;
case(d => 30 && d < 50);
if (c => 50){ 
System.out.println("C");
} else {
System.out.println("D");
}
break;
default:
System.out.println("F");
break;
}
}
}
}
}

Compiler output:
Main.java:18: error: illegal start of expression
case(d => 80);
        ^
Main.java:18: error: : or -> expected
case(d => 80);
             ^
Main.java:21: error: illegal start of expression
case(d => 65 && d < 80);
        ^
Main.java:21: error: : or -> expected
case(d => 65 && d < 80);
                       ^
Main.java:24: error: illegal start of expression
case(d => 50 && d < 65);
        ^
Main.java:24: error: : or -> expected
case(d => 50 && d < 65);
                       ^
Main.java:27: error: illegal start of expression
case(d => 30 && d < 50);
        ^
Main.java:27: error: : or -> expected
case(d => 30 && d < 50);
                       ^
Main.java:28: error: illegal start of expression
if (c => 50){ 
       ^
9 errors
Language: Java

import java.util.Scanner;
   
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for ( int n = 1; n > 0; n++){ 
int a = sc.nextInt() ;
int b = sc.nextInt() ;
int c = sc.nextInt() ;
if( a < 0 && b < 0 && c < 0){
break;
}
int d = a + b;
if ( a < 0 || b < 0){
System.out.println("F");
}else if(d => 80){
System.out.println("A");
}else if(d => 65 && d < 80){
System.out.println("B");
}else if(d => 50 && d < 65){
System.out.println("C");
}else if(d => 30 && d < 50){
if (c => 50){ 
System.out.println("C");
} else {
System.out.println("D");
}
}else{
System.out.println("F");
}
}
}
}

Compiler output:
Main.java:16: error: illegal start of expression
}else if(d => 80){
            ^
Main.java:18: error: illegal start of expression
}else if(d => 65 && d < 80){
            ^
Main.java:20: error: illegal start of expression
}else if(d => 50 && d < 65){
            ^
Main.java:22: error: illegal start of expression
}else if(d => 30 && d < 50){
            ^
Main.java:23: error: illegal start of expression
if (c => 50){ 
       ^
5 errors
Language: Java

import java.util.Scanner;
   
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for ( int n = 1; n > 0; n++){ 
int a = sc.nextInt() ;
int b = sc.nextInt() ;
int c = sc.nextInt() ;
if( a < 0 && b < 0 && c < 0) {
break;
}
int d = a + b;
if ( a < 0 || b < 0) {
System.out.println("F");
} else if(d => 80){
System.out.println("A");
} else if(d => 65 && d < 80) {
System.out.println("B");
} else if(d => 50 && d < 65) {
System.out.println("C");
} else if(d => 30 && d < 50) {
if (c => 50) { 
System.out.println("C");
} else {
System.out.println("D");
}
} else {
System.out.println("F");
}
}
}
}

Compiler output:
Main.java:16: error: illegal start of expression
} else if(d => 80){
             ^
Main.java:18: error: illegal start of expression
} else if(d => 65 && d < 80) {
             ^
Main.java:20: error: illegal start of expression
} else if(d => 50 && d < 65) {
             ^
Main.java:22: error: illegal start of expression
} else if(d => 30 && d < 50) {
             ^
Main.java:23: error: illegal start of expression
if (c => 50) { 
       ^
5 errors
Language: Java

import java.util.Scanner;
   
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
for ( int n = 1; n > 0; n++){ 
int a = sc.nextInt() ;
int b = sc.nextInt() ;
int c = sc.nextInt() ;
if( a < 0 && b < 0 && c < 0) {
break;
}
int d = a + b;
if ( a < 0 || b < 0) {
System.out.println("F");
} else if(d => 80) {
System.out.println("A");
} else if(d => 65 && d < 80) {
System.out.println("B");
} else if(d => 50 && d < 65) {
System.out.println("C");
} else if(d => 30 && d < 50) {
if (c => 50) { 
System.out.println("C");
} else {
System.out.println("D");
}
} else {
System.out.println("F");
}
}
}
}

Compiler output:
Main.java:16: error: illegal start of expression
} else if(d => 80) {
             ^
Main.java:18: error: illegal start of expression
} else if(d => 65 && d < 80) {
             ^
Main.java:20: error: illegal start of expression
} else if(d => 50 && d < 65) {
             ^
Main.java:22: error: illegal start of expression
} else if(d => 30 && d < 50) {
             ^
Main.java:23: error: illegal start of expression
if (c => 50) { 
       ^
5 errors
Language: Java

import java.util.Scanner;
public class Main{
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		while(true){
			int m = sc.nextInt();
			int f = sc.nextInt();
			int r = sc.nextInt();
			if(m == -1 && f == -1 && r == -1) break;
			if(m > 50||f > 50||r > 100) continue;
			if(m = -1||f == -1) System.out.println("F");
			else if(m + f >= 80) System.out.println("A");
			else if(m + f >= 65) System.out.println("B");
			else if(m + f >= 50) System.out.println("C");
			else if(m + f >= 30||r >= 50) System.out.println("C");
			else if(m + f >= 30) System.out.println("D");
			else System.out.println("F");
		}
	}
}

Compiler output:
Main.java:11: error: bad operand types for binary operator '||'
			if(m = -1||f == -1) System.out.println("F");
			         ^
  first type:  int
  second type: boolean
Main.java:11: error: incompatible types: int cannot be converted to boolean
			if(m = -1||f == -1) System.out.println("F");
			     ^
2 errors
Language: Java

import java.util.Scanner;

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

		while(sc.hasNext()) {
			int m = sc.nextInt();
			int f = sc.nextInt();
			int r = sc.nextInt();

			if(m == -1 && f == -1 && r == -1) {
				break;
			}

			if(m == -1 || f == -1) {
				System.out.println("F");
			} else if(m+f >= 80) {
				System.out.println("A");
			} else if(m+f >= 65 && m+f < 80) {
				System.out.println("B");
			} else if(m+f >= 50 && m+f < 65) {
				System.out.println("C");
			} else if(m+f >= 30 && m+f < 50) {
				if(r >= 50) {
					System.out.println("C");
				} else {
					System.out.println("D");
				}
			} else if(m+f < 30) {
				System.out.println("F");
			}
		}
	}
}

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

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// ?¨??????\???????????????????????????????????????
		Scanner sc= new Scanner(System.in);
		while(true){
			int m = sc.nextInt();
			int f = sc.nextInt();
			int r = sc.nextInt();
			if(m > 50 || f > 50 || r > 100) break;
			if(m == -1 && f == -1 && r == -1) break;
			if(m == -1 || f == -1) System.out.println(F);
			if(m + f >= 80) System.out.println(A);
			else if(m + f >= 65) System.out.println(B);
			else if(m + f >= 50) System.out.println(C);
			else if(m + f >= 30){
				if(r >= 50) System.out.println(C);
				else System.out.println(D);
			}
			else System.out.println(F);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			if(m == -1 || f == -1) System.out.println(F);
			                                          ^
  symbol:   variable F
  location: class Main
Main.java:14: error: cannot find symbol
			if(m + f >= 80) System.out.println(A);
			                                   ^
  symbol:   variable A
  location: class Main
Main.java:15: error: cannot find symbol
			else if(m + f >= 65) System.out.println(B);
			                                        ^
  symbol:   variable B
  location: class Main
Main.java:16: error: cannot find symbol
			else if(m + f >= 50) System.out.println(C);
			                                        ^
  symbol:   variable C
  location: class Main
Main.java:18: error: cannot find symbol
				if(r >= 50) System.out.println(C);
				                               ^
  symbol:   variable C
  location: class Main
Main.java:19: error: cannot find symbol
				else System.out.println(D);
				                        ^
  symbol:   variable D
  location: class Main
Main.java:21: error: cannot find symbol
			else System.out.println(F);
			                        ^
  symbol:   variable F
  location: class Main
7 errors
Language: Java

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		// ?¨??????\???????????????????????????????????????
		Scanner sc= new Scanner(System.in);
		while(true){
			int m = sc.nextInt();
			int f = sc.nextInt();
			int r = sc.nextInt();
			if(m > 50 || f > 50 || r > 100) break;
			if(m == -1 && f == -1 && r == -1) break;
			if(m == -1 || f == -1) System.out.println(F);
			else if(m + f >= 80) System.out.println(A);
			else if(m + f >= 65) System.out.println(B);
			else if(m + f >= 50) System.out.println(C);
			else if(m + f >= 30){
				if(r >= 50) System.out.println(C);
				else System.out.println(D);
			}
			else System.out.println(F);
		}
	}
}

Compiler output:
Main.java:13: error: cannot find symbol
			if(m == -1 || f == -1) System.out.println(F);
			                                          ^
  symbol:   variable F
  location: class Main
Main.java:14: error: cannot find symbol
			else if(m + f >= 80) System.out.println(A);
			                                        ^
  symbol:   variable A
  location: class Main
Main.java:15: error: cannot find symbol
			else if(m + f >= 65) System.out.println(B);
			                                        ^
  symbol:   variable B
  location: class Main
Main.java:16: error: cannot find symbol
			else if(m + f >= 50) System.out.println(C);
			                                        ^
  symbol:   variable C
  location: class Main
Main.java:18: error: cannot find symbol
				if(r >= 50) System.out.println(C);
				                               ^
  symbol:   variable C
  location: class Main
Main.java:19: error: cannot find symbol
				else System.out.println(D);
				                        ^
  symbol:   variable D
  location: class Main
Main.java:21: error: cannot find symbol
			else System.out.println(F);
			                        ^
  symbol:   variable F
  location: class Main
7 errors
Language: Java

import java.util.Scanner;
 
public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
		
		while(true){
			int m=sc.nextInt();
			int f=sc.nextInt();
			int r =sc.nextInt();
			if(m==-1&&f==-1&&r==-1){break;}
			int score =m+f;
			
			if(m==-1||f==-1){System.out.println("F");}
			else if(score>=80){System.out.println("A");}
			else if(score<80&&score>=65){System.out.println("B");}
			else if(score>=50&&score<65){
				System.out.println("C");}
			else if(score>=30&&score<50){
				if(re>=50){System.out.println("C");}
					else{System.out.println("D");}
				}
			else if(score<30){System.out.println("F");}
		}

}    
}

Compiler output:
Main.java:20: error: cannot find symbol
				if(re>=50){System.out.println("C");}
				   ^
  symbol:   variable re
  location: class Main
1 error
Language: Java


import java.util.Scanner;
 
public class Main{
public static void main(String[] args){
    int m,f,r;
    Scanner sc = new Scanner(System.in);
    while(true){
        m=sc.nextInt();
        f=sc.nextInt();
	r=sc.nextInt();
        if(m==-1&&f==-1&&r==-1){
            break;
        }else if(m==-1||f==-1||m+f<30){
		printf("F\n");
	}else if(m+f<50&&r<50){
		printf("D\n");
	}else if(m+f<65){
		printf("C\n");
	}else if(m+f<80){
		printf("B\n");
	}else{
		printf("A\n")
	}
    }
 
}
}

Compiler output:
Main.java:23: error: ';' expected
		printf("A\n")
		             ^
1 error
Language: Java


import java.util.Scanner;
 
public class Main{
public static void main(String[] args){
    int m,f,r;
    Scanner sc = new Scanner(System.in);
    while(true){
        m=sc.nextInt();
        f=sc.nextInt();
	r=sc.nextInt();
        if(m==-1&&f==-1&&r==-1){
            break;
        }else if(m==-1||f==-1||m+f<30){
		printf("F\n");
	}else if(m+f<50&&r<50){
		printf("D\n");
	}else if(m+f<65){
		printf("C\n");
	}else if(m+f<80){
		printf("B\n");
	}else{
		printf("A\n");
	}
    }
 
}
}

Compiler output:
Main.java:15: error: cannot find symbol
		printf("F\n");
		^
  symbol:   method printf(String)
  location: class Main
Main.java:17: error: cannot find symbol
		printf("D\n");
		^
  symbol:   method printf(String)
  location: class Main
Main.java:19: error: cannot find symbol
		printf("C\n");
		^
  symbol:   method printf(String)
  location: class Main
Main.java:21: error: cannot find symbol
		printf("B\n");
		^
  symbol:   method printf(String)
  location: class Main
Main.java:23: error: cannot find symbol
		printf("A\n");
		^
  symbol:   method printf(String)
  location: class Main
5 errors
Language: Java

import java.util.Scanner;
public class Grading{
public static void main(String[] args) {
while(true){
	Scanner sc = new Scanner(System.in); 
   	int m = sc.nextInt();
   	int f = sc.nextInt();
   	int r = sc.nextInt();
   	if(m==-1 && f==-1 && r==-1){
   		break;
   	}
   	if(m==-1 || f==-1){
   		System.out.println("F");
   	 }else if(m+f >= 80){
   		System.out.println("A");
   	 }else if(m+f >= 65 && m+f < 80){
   		System.out.println("B");
   	 }else if(m+f >= 50 && m+f < 65){
   		System.out.println("C");
   	 }else if(r >=50){
   		System.out.println("C");
   	 }else if(m+f >= 30 && m+f < 50){
   		System.out.println("D");
   	}else{
   		System.out.println("F");
   	}
	
}
}
}

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

mport java.util.Scanner;
public class Main{
public static void main(String[] args) {
while(true){
	Scanner sc = new Scanner(System.in); 
   	int m = sc.nextInt();
   	int f = sc.nextInt();
   	int r = sc.nextInt();
   	if(m==-1 && f==-1 && r==-1){
   		System.exit(0);
   	}
   	if(m==-1 || f==-1){
   		System.out.println("F");
   	 }else if(m+f >= 80){
   		System.out.println("A");
   	 }else if(m+f >= 65 && m+f < 80){
   		System.out.println("B");
   	 }else if(m+f >= 50 && m+f < 65){
   		System.out.println("C");
   	 }else if(r >=50){
   		System.out.println("C");
   	 }else if(m+f >= 30 && m+f < 50){
   		System.out.println("D");
   	}else{
   		System.out.println("F");
   	}
	
}
}
}

Compiler output:
Main.java:1: error: class, interface, enum, or record expected
mport java.util.Scanner;
^
1 error
Language: Java

import java.util.Scanner;

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

while(true){
int m = sc.nextInt();
int f = sc.nextInt();
int r = sc.nextInt();

if(m == -1 && f == -1 && r == -1){
    break;
}

if(m + f >= 80){
System.out.println("A");
}

if(m + f >= 65 && m + f < 80){
System.out.println("B");
}

if(m + f >= 50 && m + f < 65){
System.out.println("C");
}

if(m + f >= 30 && m + f < 50 && r < 50 &&  m != -1 &&  f != -1){
System.out.println("D");
}


if(m + f >= 30 && m + f < 50 && r >= 50){
System.out.println("C");
}

if(m + f < 30 && m != -1 &&  f != -1){
System.out.println("F");
}

if(m == -1){
System.out.println("F");
}

if(f == -1){
System.out.println("F");
}


}
}
}

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

import java.util.Scanner;

public class exam{
 public static void main(String[] args){
  Scanner ex = new Scanner(System.in);
  while(true){
   int mid = ex.nextInt();
   int fin = ex.nextInt();
   int re = ex.nextInt();
   if(mid == -1 && fin == -1 && re == -1) break;
   if(mid == -1 || fin == -1){
    System.out.println("F");
   }else if(mid + fin >= 80){
    System.out.println("A");
   }else if(mid + fin >= 65 && mid + fin < 80){
    System.out.println("B");
   }else if(mid + fin >= 50 && mid + fin < 65){
    System.out.println("C");
   }else if(mid + fin >= 30 && mid + fin < 50 ){
    if(re >= 50){
     System.out.println("C");
    }else{
     System.out.println("D");
    }
   }else{
    System.out.println("F");
   }
  }
 }
}

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