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

while True:
    m,f,r =[int(i) for i in input().split()]

    if m == f == r ==-1:
        break

    if (m+f) >=80:
        print("A")

    elif 65<=(m+f)<80:
        print("B")

    elif 50<=(m+f)<65 :
        print("C")

    elif 30<=(m+f)<50 and r>=50:
        print("C")
        
    elif 30 <= (m + f) and r< 50:
        print("D")
        
    elif (m+f)<30:
        print("F")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    if (m == -1 or f == -1) or (m + f < 30):
        print("F")

    if m + f >= 80:
        print("A")

    if 65 <= m + f < 80:
        print("B")

    if 50 <= m + f < 65:
        print("C")

    if 30 <= m + f < 50:
        elif r >= 50:
            print("C")
        else:
            print("D")
            
print()

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break
    total = m + f
    if m == -1 or f == -1 or total < 30:
        print("F")
    
    elif total < 80:
        print("B")
        
    elif total < 65 or r >= 50:
        print("C")
        
    elif total < 50 and r < 50:
        print("D")
        
    else:
        print("A")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

while True:
    m, f, r = [int(i) for i in input().split()]

    if m == f == r == -1:
        break

    total = m + f

    if m == -1 or f == -1 or total < 30:
        print("F")
    
    elif total < 80:
        print("B")
        
    elif total < 65 or r >= 50:
        print("C")
        
    elif total < 50 and r < 50:
        print("D")
        
    else:
        print("A")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while True:
      | ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int m, f, r, p;
	char rec;
	
	while(1){
		
		cin >> m >> f >> r;
		
		if ( m == -1 && f == -1 && r == -1 ) break;
		
		p = m + f;
		
		if ( p >= 80 )
			rec = 'A';
		if ( p >= 65 && p <= 80 ) 
			rec = 'B';
		if ( p >= 50 && p <= 65 ) 
			rec = 'C';
		if ( p <= 30 || p = -2 ) 
			rec = 'F';
		if ( p >= 30 && p <= 50 ) {
			if ( r >= 50 )   
				rec = 'C';
			else             
				rec = 'D';
		}
		
		cout << rec << endl;
		
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:22:30: error: lvalue required as left operand of assignment
   22 |                 if ( p <= 30 || p = -2 )
      |                      ~~~~~~~~^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	while(1){
		
		cin >> m >> f >> r;
		
		if ( m == f == r == -1 ) 
			break;
		
		if ( m + f >= 80 ) 
			rec = 'A';
		else if ( m + f >= 65 && m + f < 80 ) 
			rec = 'B';
		else if ( m + f >= 50 && m + f < 65 ) 
			rec = 'C';
		else if ( m + f >= 30 && m + f < 50 ) 
			if( r >= 50 ) 
				rec = 'C';
			else 
				rec = 'D';
		else if ( m == -1 || f == -1 ) 
			rec = 'F';
	
		cout >> rec << endl;
	}
	
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:24: error: 'm' was not declared in this scope; did you mean 'tm'?
    7 |                 cin >> m >> f >> r;
      |                        ^
      |                        tm
a.cc:7:29: error: 'f' was not declared in this scope
    7 |                 cin >> m >> f >> r;
      |                             ^
a.cc:7:34: error: 'r' was not declared in this scope
    7 |                 cin >> m >> f >> r;
      |                                  ^
a.cc:13:25: error: 'rec' was not declared in this scope
   13 |                         rec = 'A';
      |                         ^~~
a.cc:15:25: error: 'rec' was not declared in this scope
   15 |                         rec = 'B';
      |                         ^~~
a.cc:17:25: error: 'rec' was not declared in this scope
   17 |                         rec = 'C';
      |                         ^~~
a.cc:20:33: error: 'rec' was not declared in this scope
   20 |                                 rec = 'C';
      |                                 ^~~
a.cc:22:33: error: 'rec' was not declared in this scope
   22 |                                 rec = 'D';
      |                                 ^~~
a.cc:24:25: error: 'rec' was not declared in this scope
   24 |                         rec = 'F';
      |                         ^~~
a.cc:26:25: error: 'rec' was not declared in this scope
   26 |                 cout >> rec << endl;
      |                         ^~~
Language: C++

#include<iostream>
using namespace std;
int maun(){

	int m,f,r;
	for(;;){
		cin>>m>>f>>r;
		if(m==-1 || f==-1 || m+f<=30){				
			cout<<"F"<<endl;
		}if(m+f>=80){
			cout<<"A"<<endl;
		}if(m+f>=65 && m+f<=80){
			cout<<"B"<<endl;
		}if(m+f>=50 && m+f<=65){
			cout<<"C"<<endl;
		}if(m+f>=30 && m+f<=50){
			cout<<"D"<<endl;
		}if(m==f==r==-1)break;
	}
	return 0;

}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

#include<iostream>
using namespace std;
int maun(){
	
	int m,f,r;
	for(;;){
		cin>>m>>f>>r;
		if(m+f>=80){
			cout<<"A"<<endl;
		}if(m+f>=65 && m+f<=80){
			cout<<"B"<<endl;
		}if(m+f>=50 && m+f<=65){
			cout<<"C"<<endl;
		}if(m+f>=30 && m+f<=50){
			cout<<"D"<<endl;
		}if(m==-1 || f==-1 || m+f<=30){				
			cout<<"F"<<endl;
		}if(m==-1 || f==-1 || r==-1)break;
	}
	return 0;

}

Compiler output:
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/14/../../../x86_64-linux-gnu/Scrt1.o: in function `_start':
(.text+0x17): undefined reference to `main'
collect2: error: ld returned 1 exit status
Language: C++

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

int main() {
	int m, f, r;
	int i, t;
	for (i = 0;; i++) {
		cin >> m >> f >> r;
		t = m+f;
		if (m == -1 && f == -1 && r == -1) break;
		else if (m == -1 || f = -1) cout << 'F' << endl;
		else if (t >= 80) cout << 'A' << endl;
		else if (t >= 65) cout << 'B' << endl;
		else if (t >= 50) cout << 'C' << endl;
		else if (t >= 30) {
			if (r >= 50) cout << 'C' << endl;
			else cout << 'D' << endl;
		}
		else cout << 'F' << endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:34: error: lvalue required as left operand of assignment
   12 |                 else if (m == -1 || f = -1) cout << 'F' << endl;
      |                          ~~~~~~~~^~~~
Language: C++

#include<iostream>
using namespace std;

int main(){
	int m,f,r;
 	
 	while(1){
		cin>>m>>f>>r;
		if(m==-1&&f==-1&&r==-1){
			break;
		}
		
		if(m==-1||f==-1){
			cout<<'F'<<endl;
		}else if(m+f>=80){
			cout<<'A'<<endl;
		}else if(m+f>=65){
			cout<<'B'<<endl;
		}else if(m+f>=50){
			cout<<'C'<<endl;
		}else if(m+f>=30){
			if(r>=50){
				cout<<'C'<<emdl;
			}else{
				cout<<'D'<<endl;
			}
		}else{
			cout<<'F'<<endl;
		}
 	}
  	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:23:44: error: 'emdl' was not declared in this scope
   23 |                                 cout<<'C'<<emdl;
      |                                            ^~~~
Language: C++

#include <iostream>
using namespace std;

int main()
{
	int f,m,r;
	while(1){
		cin >> f >> m >> r;
		if(f == -1 && m == -1 && r == -1) break;
		if(m == -1 || f == -1) cout << "F" << endl;
		if(m + f >= 80) cout << "A" << endl;
		if(m + f >= 65 && m + f < 80) cout << "B";
		if(m + f >= 50 && m + f < 65) cout << "C";
		if(m + f >= 30 && m + f < 50){
			if(r < 50){
				cout << "C" << endl;
				}else{
					cout << "D" << endl;
				}
		if(m + f < 30) cout << "F" << endl;
}}		 

Compiler output:
a.cc: In function 'int main()':
a.cc:21:8: error: expected '}' at end of input
   21 | }}
      |   ^     
a.cc:5:1: note: to match this '{'
    5 | {
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
signed main(){
 int a,b,c;
 while(scanf("%d%d%d",&a,&b,&c),(a+1)||(b+1)||(c+1)){
     if((a+1)&&(b+1)&&a+b>=30){
	 if(a+b>79)printf("A\n");
	 else if(a+b>64)printf("B\n");
	 else f(a+b>49)printf("C\n");
	 else if(c>49)printf("C\n");
	 else printf("D\n");
	 }
	 else printf("F\n");
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'f' was not declared in this scope
   10 |          else f(a+b>49)printf("C\n");
      |               ^
a.cc:11:10: error: expected '}' before 'else'
   11 |          else if(c>49)printf("C\n");
      |          ^~~~
a.cc:7:31: note: to match this '{'
    7 |      if((a+1)&&(b+1)&&a+b>=30){
      |                               ^
a.cc:14:10: error: 'else' without a previous 'if'
   14 |          else printf("F\n");
      |          ^~~~
a.cc: At global scope:
a.cc:16:1: error: expected declaration before '}' token
   16 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
 
signed main(){
 int a,b,c;
 while(scanf("%d%d%d",&a,&b,&c),(a+1)||(b+1)||(c+1)){
     if((a+1)&&(b+1)&&a+b>=30){
	 if(a+b>79)printf("A\n");
	 else if(a+b>64)printf("B\n");
	 else f(a+b>49)printf("C\n");
	 else if(c>49)printf("C\n");
	 else printf("D\n");
	 else printf("F\n");
     }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:15: error: 'f' was not declared in this scope
   10 |          else f(a+b>49)printf("C\n");
      |               ^
a.cc:11:10: error: expected '}' before 'else'
   11 |          else if(c>49)printf("C\n");
      |          ^~~~
a.cc:7:31: note: to match this '{'
    7 |      if((a+1)&&(b+1)&&a+b>=30){
      |                               ^
a.cc:13:10: error: 'else' without a previous 'if'
   13 |          else printf("F\n");
      |          ^~~~
Language: C++

if __name__ == "__main__":
	lis = []
	while True:
		mid, final, re = map( int, input().split() )
		if mid == final == re == -1:
			break
		lis.append([mid,final,re])
	for i in lis:
		if i[0] == -1 or i[1] == -1:
			print("F")
		if i[0]+i[1] >= 80:
			print("A")
		elif i[0]+i[1] >= 65:
			print("B")
		elif i[0]+i[1] >= 50:
			print("C")
		elif i[0]+i[1] >= 30:
			if i[2] >= 50:
				print("C")
			else:
				print("D")
		else:
			print("F")

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'if'
    1 | if __name__ == "__main__":
      | ^~
Language: C++

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

int main()
{
	int m,f,r;
	int sum = 0;
	char grade;
	
	while(1)
	{
		scanf("%d %d %d",&m,&f,&r);
		sum = m + f;
		
		if(m == -1 && f == -1, r == -1)break;
		if(m == 0 && f == 0)
		{
			grade = 'F';
		}else
		if(80 <= sum)
		{
			grade = 'A';
		}else
		if(65  <= sum && sum < 80 )
		{
			grade = 'B';
		}else
		if(50 <= sum && sum < 65 || 50 <= r)
		{
			grade = 'C';
		}else
		if(30 <= sum && sum < 50)
		{
			if(50 <= r)
			{
				gread = 'C';
			}else{
			grade = 'D';
			}
		}else
		{
			grade = 'F';
		}
		printf("%c\n",grade);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'gread' was not declared in this scope; did you mean 'fread'?
   38 |                                 gread = 'C';
      |                                 ^~~~~
      |                                 fread
Language: C++

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

	int m,f,r;
	int sum = 0;
	char grade;

int main()
{	
	while(1)
	{
		scanf("%d %d %d",&m,&f,&r);
		sum = m + f;
		
		if(m == -1 && f == -1, r == -1)break;
		if(m == 0 && f == 0)
		{
			grade = 'F';
		}else
		if(80 <= sum)
		{
			grade = 'A';
		}else
		if(65  <= sum && sum < 80 )
		{
			grade = 'B';
		}else
		if(50 <= sum && sum < 65 || 50 <= r)
		{
			grade = 'C';
		}else
		if(30 <= sum && sum < 50)
		{
			if(50 <= r)
			{
				gread = 'C';
			}else{
			grade = 'D';
			}
		}else
		{
			grade = 'F';
		}
		printf("%c\n",grade);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'gread' was not declared in this scope; did you mean 'fread'?
   38 |                                 gread = 'C';
      |                                 ^~~~~
      |                                 fread
Language: C++

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

	int m,f,r;
	int sum = 0;
	char grade;

int main()
{	
	while(1)
	{
		scanf("%d %d %d",&m,&f,&r);
		sum = m + f;
		
		if(m == -1 && f == -1, r == -1)break;
		if(m == -1 || f == -1)
		{
			grade = 'F';
		}else
		if(80 <= sum)
		{
			grade = 'A';
		}else
		if(65  <= sum && sum < 80 )
		{
			grade = 'B';
		}else
		if(50 <= sum && sum < 65 || 50 <= r)
		{
			grade = 'C';
		}else
		if(30 <= sum && sum < 50)
		{
			if(50 <= r)
			{
				gread = 'C';
			}else{
			grade = 'D';
			}
		}else
		{
			grade = 'F';
		}
		printf("%c\n",grade);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'gread' was not declared in this scope; did you mean 'fread'?
   38 |                                 gread = 'C';
      |                                 ^~~~~
      |                                 fread
Language: C++

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

	int m,f,r;
	int sum = 0;
	char grade;

int main()
{	
	while(1)
	{
		scanf("%d %d %d",&m,&f,&r);
		sum = m + f;
		
		if(m == -1 && f == -1, r == -1)break;
		if(m == -1 || f == -1)
		{
			grade = 'F';
		}else
		if(80 <= sum)
		{
			grade = 'A';
		}else
		if(65 <= sum)
		{
			grade = 'B';
		}else
		if(50 <= sum)
		{
			grade = 'C';
		}else
		if(30 <= sum)
		{
			if(50 <= r)
			{
				gread = 'C';
			}else{
			grade = 'D';
			}
		}else{
		grade = 'F';
			}
		printf("%c\n",grade);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:38:33: error: 'gread' was not declared in this scope; did you mean 'fread'?
   38 |                                 gread = 'C';
      |                                 ^~~~~
      |                                 fread
Language: C++

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

int main()
{	
	int m,f,r;
	char grade;

	while(m+f+r != -3)
	{
		scanf("%d %d %d",&m,&f,&r);
		
		if((m == -1 || f == -1)&& m+f+r >= -2)
		{
			grade = 'F';
		}else
		if(80 <= m+f)
		{
			grade = 'A';
		}else
		if(65 <= m+f)
		{
			grade = 'B';
		}else
		if(50 <= m+f)
		{
			grade = 'C';
		}else
		if(30 <= m+f)
		{
			if(50 <= r)
			{
				gread = 'C';
			}else{
			grade = 'D';
			}
		}else{
		grade = 'F';
			}
		printf("%c\n",grade);
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:35:33: error: 'gread' was not declared in this scope; did you mean 'fread'?
   35 |                                 gread = 'C';
      |                                 ^~~~~
      |                                 fread
Language: C++

#include<iostream>
using namespace std;

char getgrade(int m, int f, int r){
  int sum = m + f;
  char grade;
  if (m == -1 || f == -1) {
    grade = 'F';
  } else if {( sum >= 80) {
    grade = 'A';
  } else if (65 <= sum && sum < 80) {
    grade = 'B';
  } else if (50 <= sum && sum < 65) {
    grade = 'C';
  } else if (30 <= sum && sum < 50) {
    grade = 'D';
    if(r >= 50) grade = 'C';
  } else if ( sum < 30) {
    grade = 'F';
  }

return grade;

}

int main(){
  int m, f, r;
  while(1){
    cin >> m >> f >> r;
    if (m == -1 && f == -1 && r == -1) break;
    char getgrade(m, f, r)

    cout << getgrade(m, f, r) << endl;
  }

return 0;
}

Compiler output:
a.cc: In function 'char getgrade(int, int, int)':
a.cc:9:13: error: expected '(' before '{' token
    9 |   } else if {( sum >= 80) {
      |             ^
      |             (
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main(){
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main(){
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:11: error: a function-definition is not allowed here before '{' token
   26 | int main(){
      |           ^
a.cc:37:2: error: expected '}' at end of input
   37 | }
      |  ^
a.cc:4:35: note: to match this '{'
    4 | char getgrade(int m, int f, int r){
      |                                   ^
a.cc:37:2: warning: no return statement in function returning non-void [-Wreturn-type]
   37 | }
      |  ^
Language: C++

#include<iostream>
using namespace std;

char getgrade(int m, int f, int r){
  int sum = m + f;
  char grade;
  if (m == -1 || f == -1) {
    grade = 'F';
  } else if {( sum >= 80) {
    grade = 'A';
  } else if (65 <= sum && sum < 80) {
    grade = 'B';
  } else if (50 <= sum && sum < 65) {
    grade = 'C';
  } else if (30 <= sum && sum < 50) {
    grade = 'D';
    if(r >= 50) grade = 'C';
  } else if ( sum < 30) {
    grade = 'F';
  }

return grade;

}

int main(){
  int m, f, r;
  while(1){
    cin >> m >> f >> r;
    if (m == -1 && f == -1 && r == -1) break;
    
    cout << getgrade(m, f, r) << endl;
  }

return 0;
}

Compiler output:
a.cc: In function 'char getgrade(int, int, int)':
a.cc:9:13: error: expected '(' before '{' token
    9 |   } else if {( sum >= 80) {
      |             ^
      |             (
a.cc:26:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   26 | int main(){
      |         ^~
a.cc:26:9: note: remove parentheses to default-initialize a variable
   26 | int main(){
      |         ^~
      |         --
a.cc:26:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:26:11: error: a function-definition is not allowed here before '{' token
   26 | int main(){
      |           ^
a.cc:36:2: error: expected '}' at end of input
   36 | }
      |  ^
a.cc:4:35: note: to match this '{'
    4 | char getgrade(int m, int f, int r){
      |                                   ^
a.cc:36:2: warning: no return statement in function returning non-void [-Wreturn-type]
   36 | }
      |  ^
Language: C++

#include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
#define PI 3.141592653589

int main(){
    int n, a, b, c, d;
	char ss;
    //int num[4][3][10]={0};
	while(1){
		cin >> a >> b >> c;
		if(a == -1 && b == -1 && c == -1)break;
		if(a == -1 || b == -1){
			a = 0;
			b = 0;
		}
		if()b = 0;
		if(80 <= a + b)ss = 'A';
		else if(65 <= a + b)ss = 'B';
		else if(50 <= a + b)ss = 'C';
		else if(30 <= a + b)ss = 'D';
		else ss = 'F';
		
		if(ss == 'D' && 50 <= c)ss = 'C';
		cout << ss << endl;
	}

    //cin>>n;
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:18:20: error: expected primary-expression before ')' token
   18 |                 if()b = 0;
      |                    ^
Language: C++

#include<stdio.h>
int main(){
int a[100][3],i=0,j=0;
while(a[i][0]!=-1&&a[i][1]!=-1&&a[i][2]!=-1){
scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
i++;
}
while(j<i){
if(a[i][0]==-1||a[i][1]==-1||a[i][2]==-1)printf("F\n");
else if(a[i][0]+a[i][1]>=80&&)printf("A\n");
else if(a[i][0]+a[i][1]<80&&a[i][0]+a[i][1]>=65)printf("B\n");
else if(a[i][0]+a[i][1]>=50&&a[i][0]+a[i][1]<65||a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50&&a[i][2]>=50)printf("C\n");
else if(a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50)printf("D\n");
else if(a[i][0]+a[i][1]<30 printf("F\n");
j++;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:30: error: expected primary-expression before ')' token
   10 | else if(a[i][0]+a[i][1]>=80&&)printf("A\n");
      |                              ^
a.cc:14:27: error: expected ';' before 'printf'
   14 | else if(a[i][0]+a[i][1]<30 printf("F\n");
      |                           ^~~~~~~
      |                           ;
a.cc:15:4: error: expected ')' before ';' token
   15 | j++;
      |    ^
      |    )
a.cc:14:8: note: to match this '('
   14 | else if(a[i][0]+a[i][1]<30 printf("F\n");
      |        ^
Language: C++

#include<stdio.h>
int main(){
int a[100][3],i=0,j=0;
while(a[i][0]!=-1&&a[i][1]!=-1&&a[i][2]!=-1){
scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
i++;
}
while(j<i){
if(a[i][0]==-1||a[i][1]==-1||a[i][2]==-1)printf("F\n");
else if(a[i][0]+a[i][1]>=80)printf("A\n");
else if(a[i][0]+a[i][1]<80&&a[i][0]+a[i][1]>=65)printf("B\n");
else if(a[i][0]+a[i][1]>=50&&a[i][0]+a[i][1]<65||a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50&&a[i][2]>=50)printf("C\n");
else if(a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50)printf("D\n");
else if(a[i][0]+a[i][1]<30 printf("F\n");
j++;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:27: error: expected ';' before 'printf'
   14 | else if(a[i][0]+a[i][1]<30 printf("F\n");
      |                           ^~~~~~~
      |                           ;
a.cc:15:4: error: expected ')' before ';' token
   15 | j++;
      |    ^
      |    )
a.cc:14:8: note: to match this '('
   14 | else if(a[i][0]+a[i][1]<30 printf("F\n");
      |        ^
Language: C++

#include<stdio.h>
int main(){
int a[100][3],i=0,j=0;
while(a[i][0]!=-1&&a[i][1]!=-1&&a[i][2]!=-1){
scanf("%d %d %d",&a[i][0],&a[i][1],&a[i][2]);
i++;
}
while(j<i){
if(a[i][0]==-1||a[i][1]==-1||a[i][2]==-1){
printf("F\n");
}
else{
else if(a[i][0]+a[i][1]>=80)printf("A\n");
else if(a[i][0]+a[i][1]<80&&a[i][0]+a[i][1]>=65)printf("B\n");
else if((a[i][0]+a[i][1]>=50&&a[i][0]+a[i][1]<65)||(a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50&&a[i][2]>=50))printf("C\n");
else if(a[i][0]+a[i][1]>=30&&a[i][0]+a[i][1]<50)printf("D\n");
else if(a[i][0]+a[i][1]<30)printf("F\n");
}
j++;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:1: error: 'else' without a previous 'if'
   13 | else if(a[i][0]+a[i][1]>=80)printf("A\n");
      | ^~~~
Language: C++

#include <iostream>
using namespace std;

int main() {
int m,f,r;
while (true){
cin>>m>>f>>r;
if(m=-1||f=-1)  {
	cout<<'F'<<endl;
}else{
 if(m+f>=80){
 	 cout<<'A'<<endl;
 }else{
 	if(m+f>=65 && m+f<80){
 	   cout<<'B'<<endl;
 	}else{
 	  if(m+f>=50 && m+f<65){
 	  	 cout<<'C'<<endl;
 	  }else{
 	  	if(m+f>=30 && m+f<50 && r>=50){
 	  		cout<<'C'<<endl;
 	  	}else{
 	  	if(m+f>=30 && m+f<50){
 	  		cout<<'D'<<endl;
 	  	}else{
 	  		cout<<'F'<<endl;
 	  	}
 	  }
 	}
 }
}
}
if(m==-1 && f==-1 && r==-1)break;
}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:8:8: error: lvalue required as left operand of assignment
    8 | if(m=-1||f=-1)  {
      |      ~~^~~
Language: C++

#include <iostream>
using namespace std;

int main() {
	int m,f,r;
	while(true){
		cin>>m>>f>>n;
		if(m == -1 && f == -1 && r == -1)break;
		else if(m == -1 || f == -1){
			cout<<"F"<<endl;
		}else if(m+f >= 80){
			cout<<"A"<<endl;
		}else if(m+f >= 65 && m+f < 80){
			cout<<"B"<<endl;
		}else if(m+f >= 50 && m+f < 65){
			cout<<"C"<<endl;
		}else if(r>=50){
			cout<<"C"<<endl;
		}else if(m+f >= 30 && m+f < 50){
			cout<<"B"<<endl;
		}else if(m+f < 30){
			cout<<"F"<<endl;
		}
	}
}

Compiler output:
a.cc: In function 'int main()':
a.cc:7:28: error: 'n' was not declared in this scope
    7 |                 cin>>m>>f>>n;
      |                            ^
Language: C++

#include<bits/stdc++.h>

2.using namespace std;

3. 

4.int main(){

5.    int m,f,r,s;

6.    char G;

7.    while(1){

8.        cin>>m>>f>>r;

9.        if(m==-1&&f==-1&&r==-1)break;

10.        s=m+f;

11.        if((m==-1)||(f==-1)){

12.            G='F';

13.        }else if(s>=80){

14.            G='A';

15.        }else if((s>=65)&&(s<80)){

16.            G='B';

17.        }else if((s>=50)&&(s<65)){

18.            G='C';

19.        }else if((s>=30)&&(s<50)){

20.            if(r>=50){

21.                G='C';

22.            }else{

23.                G='D';

24.            }

25.        }else if(s<30){

26.            G='F';

27.        }

28.        cout<<G<<endl;

29.    }

30.    return(0);

31.}

Compiler output:
a.cc:3:1: error: expected unqualified-id before numeric constant
    3 | 2.using namespace std;
      | ^~~~~~~
a.cc:5:1: error: expected unqualified-id before numeric constant
    5 | 3.
      | ^~
Language: C++

#include <iostream>
using namespace std;

int main() {
    int m,f,r;
    cin >> m f r;
    while (m!=-1 || f!=-1 || r!=-1) {
    if(m=-1 ||f=-1){
    cout<<'F'<<endl;	
    }
    if(m>=0 && f>=0 && m+f>=80){	
    cout <<'A' << endl;
    }
    if(m>=0 && f>=0 && 65<=m+f<80){
    cout<<'B'<<endl;
    }
    if(m>=0 && f>=0 && 50<=m+f<65){
    cout<<'C'<<endl;
    }
    if(m>=0 && f>=0 && 30<=m+f<50 && r>=50){
    cout<<'C'<<endl;	
    }
    if(m>=0 && f>=0 && 30<=m+f<50 && r<50){
    cout<<'D'<<endl;
    }
    if(m>=0 && f>=0 && m+f<30){
    cout<<'F'<<endl;	
    }
    cin>>m f r;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'f'
    6 |     cin >> m f r;
      |             ^~
      |             ;
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |     if(m=-1 ||f=-1){
      |          ~~~^~~
a.cc:29:11: error: expected ';' before 'f'
   29 |     cin>>m f r;
      |           ^~
      |           ;
a.cc:30:2: error: expected '}' at end of input
   30 | }
      |  ^
a.cc:4:12: note: to match this '{'
    4 | int main() {
      |            ^
Language: C++

#include <iostream>
using namespace std;

int main() {
    int m,f,r;
    cin >> m f r;
    while (m!=-1 || f!=-1 || r!=-1) {
    if(m=-1 ||f=-1){
    cout<<'F'<<endl;	
    }
    if(m>=0 && f>=0 && m+f>=80){	
    cout <<'A' << endl;
    }
    if(m>=0 && f>=0 && 65<=m+f<80){
    cout<<'B'<<endl;
    }
    if(m>=0 && f>=0 && 50<=m+f<65){
    cout<<'C'<<endl;
    }
    if(m>=0 && f>=0 && 30<=m+f<50 && r>=50){
    cout<<'C'<<endl;	
    }
    if(m>=0 && f>=0 && 30<=m+f<50 && r<50){
    cout<<'D'<<endl;
    }
    if(m>=0 && f>=0 && m+f<30){
    cout<<'F'<<endl;	
    }
    cin>>m f r;
    }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:6:13: error: expected ';' before 'f'
    6 |     cin >> m f r;
      |             ^~
      |             ;
a.cc:8:13: error: lvalue required as left operand of assignment
    8 |     if(m=-1 ||f=-1){
      |          ~~~^~~
a.cc:29:11: error: expected ';' before 'f'
   29 |     cin>>m f r;
      |           ^~
      |           ;
Language: C++

int main() {
	int m,f,r,k,i = 0;
	char a[1000];
	while(m != -1 || f != -1 || r != -1){
		cin >> m >> f >> r;
		if ((m+f < 30 || m == -1 || f == -1) && r < 50)
			a[k] = 'F';
		else if (m+f < 50)
			a[k] = 'D';
		else if (m+f < 65)
			a[k] = 'C';
		else if (m+f < 80)
			a[k] = 'B';
		else
			a[k] = 'A';
		k++;
	}
	for(i=0;i<k-1;i++){
		cout << a[i] <<endl;
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:17: error: 'cin' was not declared in this scope
    5 |                 cin >> m >> f >> r;
      |                 ^~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << a[i] <<endl;
      |                 ^~~~
a.cc:19:32: error: 'endl' was not declared in this scope
   19 |                 cout << a[i] <<endl;
      |                                ^~~~
Language: C++

#include<stdio.h>
int main(){
    int m, f, r;
    int TRUE=1;
    for(;;){
        scanf("%d %d %d", &m, &f, &r);
        if(m==-1&&f==-1&&r==-1)break;
        if(m==-1 || f==-1)printf("F\n");;
        else if(m+f>=80)printf("A\n");
        else if(m+f>=65)printf("B\n");
        else if(m+f>=50 || r>=50)printf("C\n");
        else if(m+f>=30)printf("D\n");
        else printf("F\n");
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:9: error: 'else' without a previous 'if'
    9 |         else if(m+f>=80)printf("A\n");
      |         ^~~~
Language: C++

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

int main(){
	int m, f, r, a;
	for(int i=0;;i++){
		cin >> m >> f >> r;
		if(m==-1&&f==-1&&r==-1){
			break;
		}else{
			a=m+f;
			if(m<=0||f<=0||){
				cout << "F" << endl;
			}else if(a>=80){
				cout << "A" << endl;
			}else if(a<80&&a>=65){
				cout << "B" << endl;
			}else if(a<65&&a>=50){
				cout << "C" << endl;
			}else if(a<50&&a>=30){
				if(r>=50){
					cout << "C" << endl;
				}else{
					cout << "D" << endl;
				}
			}else if(a<30){
				cout << "F" << endl;
			}
		}
	}
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:13:40: error: expected primary-expression before ')' token
   13 |                         if(m<=0||f<=0||){
      |                                        ^
Language: C++

#include <iostream>

int main()
{
    int mid, fin, re;
    int cnt = 0;
    while (std::cin >> mid >> fin >> re) {
        if (mid == -1 and fin == -1 and re == -1) {
            break;
        }
        if (mid == -1 or fin == -1) {
            std::cout << "F" << std::endl;
            continue;
        }
        if (mf_sum >= 80) {
            std::cout << "A" << std::endl;
        } else if (mf_sum >= 65) {
            std::cout << "B" << std::endl;
        } else if (mf_sum >= 50) {
            std::cout << "C" << std::endl;
        } else if (mf_sum >= 30) {
            if (re >= 50) {
                std::cout << "C" << std::endl;
            } else {
                std::cout << "D" << std::endl;
            }
        } else {
            std::cout << "F" << std::endl;
        }
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:13: error: 'mf_sum' was not declared in this scope
   15 |         if (mf_sum >= 80) {
      |             ^~~~~~
Language: C++

int main ()
{
	int a,b,c;

	for (int s = -2; s < 100; s++)
	{
		if (a == -1 && b == -1 && c == -1)
					{
						break;
	                }
	}

	if (a < -1 || a > -1 || b < -1 || b > -1 || c < -1 || c  > -1 ){
	for (int s = -2; s < 100; s++)
  {

		cin >> a >> b >> c;

		cout << endl;

	if (a == -1)
	{
		cout << 'F' ;
	}
	else if (b == -1)
	{
		cout << 'F';
	}

	else if (a + b >= 80)
	{
		cout << 'A';
	}

	else if (a + b >= 65)
	{
		cout << 'B';
	}

	else if (a + b >= 50 || c >= 50)
		{
		cout << 'C';
		}

	else if (a + b >= 30 && a > -1 && b > -1)
		{
		cout << 'D';
		}
	else if (a + b < 30 && a > -1 && b > -1)
	{
		cout << 'F';
	}

  }
	}}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:17: error: 'cin' was not declared in this scope
   17 |                 cin >> a >> b >> c;
      |                 ^~~
a.cc:19:17: error: 'cout' was not declared in this scope
   19 |                 cout << endl;
      |                 ^~~~
a.cc:19:25: error: 'endl' was not declared in this scope
   19 |                 cout << endl;
      |                         ^~~~
Language: C++

#include <iostream>

using namespace std;

int main ()
{
	int a,b,c;
		if (a == -1 && b == -1 && c == -1)
		break;

	if (a < -1 || a > -1 || b < -1 || b > -1 || c < -1 || c  > -1 ){
	for (int s = -2; s < 100; s++)
  {

		cin >> a >> b >> c;
		if (a == -1 && b == -1 && c == -1)
		break;

		cout << endl;

	if (a == -1)
	{
		cout << 'F' ;
	}
	else if (b == -1)
	{
		cout << 'F';
	}

	else if (a + b >= 80)
	{
		cout << 'A';
	}

	else if (a + b >= 65)
	{
		cout << 'B';
	}

	else if (a + b >= 50 || c >= 50)
		{
		cout << 'C';
		}

	else if (a + b >= 30 && a > -1 && b > -1)
		{
		cout << 'D';
		}
	else if (a + b < 30 && a > -1 && b > -1)
	{
		cout << 'F';
	}

  }
	}}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:17: error: break statement not within loop or switch
    9 |                 break;
      |                 ^~~~~
Language: C++

#include<iostream>
using namespace std;

int main(){

int m,f,r;
cin >>m >>f >>r;

if(m==-1||f==-1||m+f<30) cout <<"F" <<endl;
else if(m+f>=80) cout <<"A" <<endl;
else if(m+f>=65 && m+f<80) cout <<"B" <<endl;
else if((m+f<65 && m+f>=50)||r=>50) cout <<"C" <<endl;
else if(30<=m+f && m+f<50 && r<50) cout <<"D" <<endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:12:32: error: expected primary-expression before '>' token
   12 | else if((m+f<65 && m+f>=50)||r=>50) cout <<"C" <<endl;
      |                                ^
Language: C++

#include<iostream>
using namespace std;

char getGrade(int m, int f, int r){
int sum=m+f;
char grade;
if(m==-1||f==-1) grade='F';
else if(80<=sum) grade='A';
else if(65<=sum && sum<80) grade='B';
else if(50<=sum && sum<65) grade='C';
else if(30<=sum && sum<50){
if(50<=r) grade='C';
else grade='D';
}
else if(sum<30) grade='F';
return grade;
}

int main(){
int m,f,r;
while(1){
cin >>m >>f >>r;
if(m==-1 && f==-1 && r==-1) break;
cout <<grade(m,f,r) <<endl;
}

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:24:8: error: 'grade' was not declared in this scope
   24 | cout <<grade(m,f,r) <<endl;
      |        ^~~~~
Language: C++

#include <iostream>
using namesapce std;

char tokuten(int m, int f,int r){
	int sum ;
	char seki;
	sum = m + f;
	if( m == -1 || f == -1 ){
		seki = 'F';
	} else if( 80 <= sum ){
		seki = 'A';
	} else if( 65 <= sum && sum < 80 ){
		seki = 'B';
	} else if( 50 <= sum && sum < 65 ){
		seki = 'C';
	} else if( 30 <= sum && sum < 50 ){
		if( 50 <= r )
			seki = 'C'
		else 
			seki = 'D'
	} else if( sum < 30 ){
		seki = 'F'
	}

	return seki;
}

int main(){
	int m,f,r;
	while(1){
		cin >> m >> f >> r;
		if( m == -1 && f == -1 && r == -1 )break;
		cout << tokuten(m, f, r) << endl;
	}

	return 0;
}

Compiler output:
a.cc:2:7: error: expected nested-name-specifier before 'namesapce'
    2 | using namesapce std;
      |       ^~~~~~~~~
a.cc: In function 'char tokuten(int, int, int)':
a.cc:18:35: error: expected ';' before 'else'
   18 |                         seki = 'C'
      |                                   ^
      |                                   ;
   19 |                 else
      |                 ~~~~               
a.cc:22:27: error: expected ';' before '}' token
   22 |                 seki = 'F'
      |                           ^
      |                           ;
   23 |         }
      |         ~                  
a.cc: In function 'int main()':
a.cc:31:17: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
   31 |                 cin >> m >> f >> r;
      |                 ^~~
      |                 std::cin
In file included from a.cc:1:
/usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
a.cc:33:17: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
   33 |                 cout << tokuten(m, f, r) << endl;
      |                 ^~~~
      |                 std::cout
/usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
a.cc:33:45: error: 'endl' was not declared in this scope; did you mean 'std::endl'?
   33 |                 cout << tokuten(m, f, r) << endl;
      |                                             ^~~~
      |                                             std::endl
In file included from /usr/include/c++/14/iostream:41:
/usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here
  744 |     endl(basic_ostream<_CharT, _Traits>& __os)
      |     ^~~~
Language: C++

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

int main(){
	int m,f,r;
	while(true){
		if(m == -1||f == -1||r == -1)break;
		if(m + f >= 80)cout << "A" << endl;
		else if(65 <= m + f < 80)cout << "B" << endl;
		else if(50 <= m + f < 65)cout << "C" << endl;
		else if(30 <= m + f < 50)
			if(f > 50)cout << "C" << endl;
			else if(f < 50)cout << "D" << endl;
		else if(m + f < 30)cout << "D"
	}
	return 0;

}

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

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

int main(){
	int m,f,r;
	while(true){
		if(m == -1||f == -1||r == -1)break;
		if(m + f >= 80)cout << "A" << endl;
		else if(65 <= m + f < 80)cout << "B" << endl;
		else if(50 <= m + f < 65)cout << "C" << endl;
		else if(30 <= m + f < 50)
			if(f > 50)cout << "C" << endl;
			else if(f < 50)cout << "D" << endl;
		else if(m + f < 30)cout << "D"
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:14:47: error: expected ';' before '}' token
   14 |                 else if(m + f < 30)cout << "D"
      |                                               ^
      |                                               ;
   15 |         }
      |         ~
Language: C++

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

int main(){
	int m,f,r;
	while(true){
		cin >> m >> f >> r;
		if(m == -1&&f == -1&&r == -1)break;
		if(m + f >= 80)cout << "A" << endl;
		else if(65 <= m + f < 80)cout << "B" << endl;
		else if(50 <= m + f < 65)cout << "C" << endl;
		else if(30 <= m + f < 50)
			if(f > 50)cout << "C" << endl;
			else if(f < 50)cout << "D" << endl;
		else if(m + f < 30)cout << "D"
	}
	return 0;

}

Compiler output:
a.cc: In function 'int main()':
a.cc:15:47: error: expected ';' before '}' token
   15 |                 else if(m + f < 30)cout << "D"
      |                                               ^
      |                                               ;
   16 |         }
      |         ~
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(){
  cin >> m >> f >> r;
  int c = m+f;
 if ( c => 80 ){
 cout << A << endl;
}else if( c => 65 && c < 80 ){
 cout << B << endl;
}else if( c => 50 && c < 65 ){
 cout << C << endl;
}else if( c => 30 && c < 50 && r => 50 ){
 cout << C << endl;
}else if( c => 30 && c < 50 ){
 cout << D << endl:
}else if( m == -1 ){
 cout << F << endl;
}else if( f == -1 ){
 cout << F << endl;
}else if( c < 30){
 cout << F << endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:5:8: error: expected primary-expression before ')' token
    5 |  while(){
      |        ^
a.cc:8:10: error: expected primary-expression before '>' token
    8 |  if ( c => 80 ){
      |          ^
a.cc:9:10: error: 'A' was not declared in this scope
    9 |  cout << A << endl;
      |          ^
a.cc:10:14: error: expected primary-expression before '>' token
   10 | }else if( c => 65 && c < 80 ){
      |              ^
a.cc:11:10: error: 'B' was not declared in this scope
   11 |  cout << B << endl;
      |          ^
a.cc:12:14: error: expected primary-expression before '>' token
   12 | }else if( c => 50 && c < 65 ){
      |              ^
a.cc:13:10: error: 'C' was not declared in this scope
   13 |  cout << C << endl;
      |          ^
a.cc:14:14: error: expected primary-expression before '>' token
   14 | }else if( c => 30 && c < 50 && r => 50 ){
      |              ^
a.cc:14:35: error: expected primary-expression before '>' token
   14 | }else if( c => 30 && c < 50 && r => 50 ){
      |                                   ^
a.cc:15:10: error: 'C' was not declared in this scope
   15 |  cout << C << endl;
      |          ^
a.cc:16:14: error: expected primary-expression before '>' token
   16 | }else if( c => 30 && c < 50 ){
      |              ^
a.cc:17:10: error: 'D' was not declared in this scope
   17 |  cout << D << endl:
      |          ^
a.cc:19:10: error: 'F' was not declared in this scope
   19 |  cout << F << endl;
      |          ^
a.cc:21:10: error: 'F' was not declared in this scope
   21 |  cout << F << endl;
      |          ^
a.cc:23:10: error: 'F' was not declared in this scope
   23 |  cout << F << endl;
      |          ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
 else if ( c => 80 ){
 cout << A << endl;
}else if( c => 65 && c < 80 ){
 cout << B << endl;
}else if( c => 50 && c < 65 ){
 cout << C << endl;
}else if( c => 30 && c < 50 && r => 50 ){
 cout << C << endl;
}else if( c => 30 && c < 50 ){
 cout << D << endl:
}else if( m == -1 ){
 cout << F << endl;
}else if( f == -1 ){
 cout << F << endl;
}else if( c < 30){
 cout << F << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before '>' token
    9 |  else if ( c => 80 ){
      |               ^
a.cc:10:10: error: 'A' was not declared in this scope
   10 |  cout << A << endl;
      |          ^
a.cc:11:14: error: expected primary-expression before '>' token
   11 | }else if( c => 65 && c < 80 ){
      |              ^
a.cc:12:10: error: 'B' was not declared in this scope
   12 |  cout << B << endl;
      |          ^
a.cc:13:14: error: expected primary-expression before '>' token
   13 | }else if( c => 50 && c < 65 ){
      |              ^
a.cc:14:10: error: 'C' was not declared in this scope
   14 |  cout << C << endl;
      |          ^
a.cc:15:14: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |              ^
a.cc:15:35: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |                                   ^
a.cc:16:10: error: 'C' was not declared in this scope
   16 |  cout << C << endl;
      |          ^
a.cc:17:14: error: expected primary-expression before '>' token
   17 | }else if( c => 30 && c < 50 ){
      |              ^
a.cc:18:10: error: 'D' was not declared in this scope
   18 |  cout << D << endl:
      |          ^
a.cc:20:10: error: 'F' was not declared in this scope
   20 |  cout << F << endl;
      |          ^
a.cc:22:10: error: 'F' was not declared in this scope
   22 |  cout << F << endl;
      |          ^
a.cc:24:10: error: 'F' was not declared in this scope
   24 |  cout << F << endl;
      |          ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:5:10: note: to match this '{'
    5 |  while(1){
      |          ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
 else if ( c => 80 ){
 cout << "A" << endl;
}else if( c => 65 && c < 80 ){
 cout << "B" << endl;
}else if( c => 50 && c < 65 ){
 cout << "C" << endl;
}else if( c => 30 && c < 50 && r => 50 ){
 cout << "C" << endl;
}else if( c => 30 && c < 50 ){
 cout << "D" << endl:
}else if( m == -1 ){
 cout << "F" << endl;
}else if( f == -1 ){
 cout << "F" << endl;
}else if( c < 30){
 cout << "F" << endl;

return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before '>' token
    9 |  else if ( c => 80 ){
      |               ^
a.cc:11:14: error: expected primary-expression before '>' token
   11 | }else if( c => 65 && c < 80 ){
      |              ^
a.cc:13:14: error: expected primary-expression before '>' token
   13 | }else if( c => 50 && c < 65 ){
      |              ^
a.cc:15:14: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |              ^
a.cc:15:35: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |                                   ^
a.cc:17:14: error: expected primary-expression before '>' token
   17 | }else if( c => 30 && c < 50 ){
      |              ^
a.cc:18:21: error: expected ';' before ':' token
   18 |  cout << "D" << endl:
      |                     ^
      |                     ;
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:5:10: note: to match this '{'
    5 |  while(1){
      |          ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
 else if ( c => 80 ){
 cout << "A" << endl;
}else if( c => 65 && c < 80 ){
 cout << "B" << endl;
}else if( c => 50 && c < 65 ){
 cout << "C" << endl;
}else if( c => 30 && c < 50 && r => 50 ){
 cout << "C" << endl;
}else if( c => 30 && c < 50 ){
 cout << "D" << endl;
}else if( m == -1 ){
 cout << "F" << endl;
}else if( f == -1 ){
 cout << "F" << endl;
}else if( c < 30){
 cout << "F" << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:15: error: expected primary-expression before '>' token
    9 |  else if ( c => 80 ){
      |               ^
a.cc:11:14: error: expected primary-expression before '>' token
   11 | }else if( c => 65 && c < 80 ){
      |              ^
a.cc:13:14: error: expected primary-expression before '>' token
   13 | }else if( c => 50 && c < 65 ){
      |              ^
a.cc:15:14: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |              ^
a.cc:15:35: error: expected primary-expression before '>' token
   15 | }else if( c => 30 && c < 50 && r => 50 ){
      |                                   ^
a.cc:17:14: error: expected primary-expression before '>' token
   17 | }else if( c => 30 && c < 50 ){
      |              ^
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
 else if ( c >= 80 ){
 cout << "A" << endl;
}else if( c >= 65 && c < 80 ){
 cout << "B" << endl;
}else if( c >= 50 && c < 65 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 && r >= 50 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 ){
 cout << "D" << endl;
}else if( m == -1 ){
 cout << "F" << endl;
}else if( f == -1 ){
 cout << "F" << endl;
}else if( c < 30){
 cout << "F" << endl;
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:2: error: expected '}' at end of input
   27 | }
      |  ^
a.cc:3:11: note: to match this '{'
    3 | int main(){
      |           ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
 }else if( m == -1 ){
 cout << "F" << endl;
}else if( f == -1 ){
 cout << "F" << endl;
}else if ( c >= 80 ){
 cout << "A" << endl;
}else if( c >= 65 && c < 80 ){
 cout << "B" << endl;
}else if( c >= 50 && c < 65 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 && r >= 50 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 ){
 cout << "D" << endl;

}else if( c < 30){
 cout << "F" << endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:3: error: 'else' without a previous 'if'
    9 |  }else if( m == -1 ){
      |   ^~~~
a.cc:13:12: error: 'c' was not declared in this scope
   13 | }else if ( c >= 80 ){
      |            ^
a.cc: At global scope:
a.cc:28:1: error: expected unqualified-id before 'return'
   28 | return 0;
      | ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<bits/stdc++.h>
using namespace std;
int main(){
 int m, f, r;
 while(1){
  cin >> m >> f >> r;
  int c = m+f;
 if( m == -1 && f == -1 && r == -1)break;
}else if( m == -1 ){
 cout << "F" << endl;
}else if( f == -1 ){
 cout << "F" << endl;
}else if ( c >= 80 ){
 cout << "A" << endl;
}else if( c >= 65 && c < 80 ){
 cout << "B" << endl;
}else if( c >= 50 && c < 65 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 && r >= 50 ){
 cout << "C" << endl;
}else if( c >= 30 && c < 50 ){
 cout << "D" << endl;
}else if( c < 30){
 cout << "F" << endl;
}
}
return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:9:2: error: 'else' without a previous 'if'
    9 | }else if( m == -1 ){
      |  ^~~~
a.cc:13:12: error: 'c' was not declared in this scope
   13 | }else if ( c >= 80 ){
      |            ^
a.cc: At global scope:
a.cc:27:1: error: expected unqualified-id before 'return'
   27 | return 0;
      | ^~~~~~
a.cc:28:1: error: expected declaration before '}' token
   28 | }
      | ^