criyle/codenet-compile-errors huggingface dataset:
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 || 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 || f == -1 ){
      |  ^~~~
a.cc:11:12: error: 'c' was not declared in this scope
   11 | }else if ( c >= 80 ){
      |            ^
a.cc: At global scope:
a.cc:25:1: error: expected unqualified-id before 'return'
   25 | return 0;
      | ^~~~~~
a.cc:26:1: error: expected declaration before '}' token
   26 | }
      | ^
Language: C++

def check(n):
    if n < 0:
        n = 0
    return n

m = 0
f = 0
r = 0

while(True):
    I = input().split()
    m = int(I[0])
    f = int(I[1])
    r = int(I[2])
    if m == -1 and f == -1 and r == -1:
        break
    m = check(m)
    f = check(f)
    r = check(r)
    score = m + f
    if score >= 80:
        print('A')
    if 65 <= score and score < 80:
        print('B')
    if 50 <= score and score < 65:
        print('C')
    if 30 <= score and score < 50:
        if r >= 50:
            print('C')
        else:
            print('D')
    if score < 30:
        print('F')

Compiler output:
a.cc:1:1: error: 'def' does not name a type
    1 | def check(n):
      | ^~~
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;
  else 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" << endl;
   else cout << "D" << endl;
  }
  else cout << "F" << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << "A" << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << "B" << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << "C" << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << "C" << 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" << endl;
   else cout << "D" << endl;
  }
  else cout << "F" << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << "A" << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << "B" << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << "C" << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << "C" << 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' << endl;
   else cout << 'D' << endl;
  }
  else cout << 'F' << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << 'A' << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << 'B' << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << 'C' << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << 'C' << 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' << endl;
   else{
    cout << 'D' << endl;
   }  
  }
  else{
   cout << 'F' << endl;
  }
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << 'A' << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << 'B' << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << 'C' << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << 'C' << endl;
      |         ^
Language: C++

#include <iostream>
using namespace std;

int main(){

 while(1){
 int m,f,r; 
  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' << endl;
   else{
    cout << 'D' << endl;
   }  
  }
  else{
   cout << 'F' << endl;
  }
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << 'A' << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << 'B' << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << 'C' << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << 'C' << 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' << endl;
   else cout << 'D' << endl;
  else cout << 'F' << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << 'A' << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << 'B' << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << 'C' << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << 'C' << endl;
      |         ^
a.cc:17:3: error: expected '}' before 'else'
   17 |   else cout << 'F' << endl;
      |   ^~~~
a.cc:14:19: note: to match this '{'
   14 |   else if(m+f=>30){
      |                   ^
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" << endl;
   else cout << "D" << endl;
  else cout << "F" << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << "A" << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << "B" << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << "C" << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << "C" << endl;
      |         ^
a.cc:17:3: error: expected '}' before 'else'
   17 |   else cout << "F" << endl;
      |   ^~~~
a.cc:14:19: note: to match this '{'
   14 |   else if(m+f=>30){
      |                   ^
Language: C++

#include <iostream>
using namespace std;

int main(){

 while(1){
  int m,f,r;
  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" << endl;
   else cout << "D" << endl;
  else cout << "F" << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:11:15: error: expected primary-expression before '>' token
   11 |   else if(m+f=>80)cout << "A" << endl;
      |               ^
a.cc:12:15: error: expected primary-expression before '>' token
   12 |   else if(m+f=>65)cout << "B" << endl;
      |               ^
a.cc:13:15: error: expected primary-expression before '>' token
   13 |   else if(m+f=>50)cout << "C" << endl;
      |               ^
a.cc:14:15: error: expected primary-expression before '>' token
   14 |   else if(m+f=>30){
      |               ^
a.cc:15:9: error: expected primary-expression before '>' token
   15 |    if(r=>50)cout << "C" << endl;
      |         ^
a.cc:17:3: error: expected '}' before 'else'
   17 |   else cout << "F" << endl;
      |   ^~~~
a.cc:14:19: note: to match this '{'
   14 |   else if(m+f=>30){
      |                   ^
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" << endl;
   else cout << "D" << endl;
  else cout << "F" << endl;
 }

 return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:17:3: error: expected '}' before 'else'
   17 |   else cout << "F" << endl;
      |   ^~~~
a.cc:14:19: note: to match this '{'
   14 |   else if(m+f>=30){
      |                   ^
Language: C++

#include <stdio.h>
int main(){
int a,b,c;
char ans;
while(1){
scanf("%d%d%d",&a,&b,&c);
if(a==-1||b==-1){
if(a==b&&c==b)return 0;
ans='F';
}
if(a+b<30)ans='F';
if(a+b>=30){
ans='D';
if(c>=50)ans='C';
}
if(a+b>=50)ans='C';
if(a+b>=65)ans='B';
if(a+b>=80)ans='A';
printf("%c\n",ans);
}

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

#include <iostream>
using  namespace std;
int main()
{
	char Result[10000];
	int m, f, r = 0;
	for (int i = 0; i<10000; i++)
	{
		cin >> m >> f >> r;
		if ((m == -1) || (f == -1))Result[i] = 'F';
		else if (m + f >= 80)Result[i] = 'A';
		else if (m + f >= 65)Result[i] = 'B';
		else if ((m + f >= 50) || (r >= 50))Result[i] = 'C';
		else if (m + f >= 30)Result[i] = 'D';
		else Result[i] = 'F';
		if ((m == -1) && (f == -1) && (r == -1))
		{
		r = i;
		break;
		}
	}
	for (int i = 0; i<r; i++)
	{
		cout << Result[i] << endl;
	}
	return 0;

Compiler output:
a.cc: In function 'int main()':
a.cc:26:18: error: expected '}' at end of input
   26 |         return 0;
      |                  ^
a.cc:4:1: note: to match this '{'
    4 | {
      | ^
Language: C++

#include <iostream>

int main() {
  int m;
  int f;
  int r;

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

  return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:10:44: error: expected ';' before 'if'
   10 |     if(m == -1 && f == -1 && r == -1) break
      |                                            ^
      |                                            ;
   11 |     if(m == 0 || f == 0) {
      |     ~~
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:8:19: error: expected primary-expression before '>' token
    8 |     } else if(i+j=>80){
      |                   ^
a.cc:10:20: error: expected primary-expression before '>' token
   10 |     } else if (i+j=>65){
      |                    ^
a.cc:12:20: error: expected primary-expression before '>' token
   12 |     } else if (i+j=>50){
      |                    ^
a.cc:14:20: error: expected primary-expression before '>' token
   14 |     } else if (i+j=>30&&r=>50)
      |                    ^
a.cc:14:27: error: expected primary-expression before '>' token
   14 |     } else if (i+j=>30&&r=>50)
      |                           ^
a.cc:16:7: error: 'else' without a previous 'if'
   16 |     } else if (i+j=>30){
      |       ^~~~
a.cc:16:20: error: expected primary-expression before '>' token
   16 |     } else if (i+j=>30){
      |                    ^
a.cc: At global scope:
a.cc:22:3: error: expected unqualified-id before 'return'
   22 |   return 0;
      |   ^~~~~~
a.cc:23:1: error: expected declaration before '}' token
   23 | }
      | ^
Language: C++

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

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: expected primary-expression before ')' token
    4 |   while(){
      |         ^
Language: C++

#include <stdio.h>
int m,f,r;
int main(){
  for(;;){
    scanf(" %d %d %d",&m,&f,&r);
    if(m==-1&&f==-1&&r==-1){
      return 0;
    } else 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){
      printf("C\n");
    } else if(m+f>=30&&r>=50){
      printf("C\n");
    } else {
      printd("F\n");
    }
  }
}

Compiler output:
a.cc: In function 'int main()':
a.cc:19:7: error: 'printd' was not declared in this scope; did you mean 'printf'?
   19 |       printd("F\n");
      |       ^~~~~~
      |       printf
Language: C++

#include<iostream>
char judge(int m,int r,int f){
    char grade;
    int sum=m+r;
    if(m==-1 || r==-1) grade='F';
    else if(sum>=80) grade='A';
    else if(sum>=65) grade='B';
    else if(sum>=50) grade='C';
    else if(sum>=30){
        grade='D';
        if(f>=50) grade='C';
    }
    else grade='F';
    return grade;
}
int main(void){
    int m,r,f;
    while(1){
        std::cin>>m>>r>>f;
        if(m==-1&&r==-1&&f==-1) break;
        std::cout<<grade<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: 'grade' was not declared in this scope
   21 |         std::cout<<grade<<std::endl;
      |                    ^~~~~
Language: C++

#include<iostream>
char judge(int m,int r,int f){
    char grade;
    int sum=m+r;
    if(m==-1 || r==-1) grade='F';
    else if(sum>=80) grade='A';
    else if(sum>=65) grade='B';
    else if(sum>=50) grade='C';
    else if(sum>=30){
        grade='D';
        if(f>=50) grade='C';
    }
    else grade='F';
    return grade;
}
int main(void){
    int m,r,f;
    while(1){
        std::cin>>m>>r>>f;
        if(m==-1&&r==-1&&f==-1) break;
        std::cout<<judege(m,r,f)<<std::endl;
    }
    return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:21:20: error: 'judege' was not declared in this scope; did you mean 'judge'?
   21 |         std::cout<<judege(m,r,f)<<std::endl;
      |                    ^~~~~~
      |                    judge
Language: C++

while True:
    m, f, r = map(int, input().split())
    if m == f == r == -1:
        break
    sum = m + f
    if m == -1 | f == -1 | sum < 30:
        print('F')
    elif sum < 50 & r < 50:
        print('D')
    elif sum < 65:
        print('C')
    elif sum < 80:
        print('B')
    else:
        print('A')

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

#include <iostream>

int main()
{
	int a, b, c;
	char s;
	for (;;) {
		std::cin >> a >> b >> c;
		if (a == -1 && b == -1 && c == -1) break;
		else if (a >= 80 && b >= 80) s = 'A';
		else if (a >= 65 && b >= 65) s = 'B';
		else if (a >= 50 && b >= 50 || c >= 50) s = 'C';
		else if (a >= 30 && b >= 30) s = 'D';
		else s = 'F';
		std::cout << s << '\n';
}

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

#include<iostream>
using namespace std;
int main1() {
    int a, b, c;
    while (1) {
        cin >> a >> b >> c;
        if (a == -1 && b == -1 && c == -1)break;
        int o = a + b ;
        if (o >= 80)cout << "A" << endl;
        else if (o >= 65 && o < 80)cout << "B" << endl;
        else if (o >= 50 && o < 65)cout << "C" << endl;
        else if (o >= 30 && o < 50 && c >= 50)cout << "C" << endl;
        else if (o < 30)cout << "E" << endl;
        else cout << "D" << endl;
    }
    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++

while 1:
 m,f,r=map(int,input().split());s=m+f
 if m==f==r==-1:break
 if m==-1 or f==-1 or s<30:print('F')
 elif s<50 and r<50:print('D')
 elif s<65:print('C')
 elif s<80:print('B')
 else:print('A')

Compiler output:
a.cc:1:1: error: expected unqualified-id before 'while'
    1 | while 1:
      | ^~~~~
a.cc:2:33: error: 's' does not name a type
    2 |  m,f,r=map(int,input().split());s=m+f
      |                                 ^
Language: C++

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 == -1 || f == -1) { 
				System.out.println('F'); 
				continue; 
			} 
			if(m + f >= 80) { 
				System.out.println('A'); 
				continue; 
			} 
			if(m + f >= 65) { 
				System.out.println('B'); 
				continue; 
			} 
			if(m + f >= 50) { 
				System.out.println('C'); 
				continue; 
			} 
			if(m + f >= 30) { 
				if(r >= 50) System.out.println('C'); 
				else System.out.println('D'); 
				continue; 
			}
			
			System.out.println('F'); 
		} 
	} 
}



Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.Scanner;
      | ^~~~~~
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++

loop {
  sum = 0
  m_score,f_score,r_score = gets.split.map(&:to_i)
  break if m_score == -1 && f_score == -1 && r_score == -1
  sum = m_score + f_score

  if sum >= 80
    puts "A"
  elsif sum < 80 && sum >= 65
    puts "B"
  elsif sum < 65 && sum >= 50
    puts "C"
  elsif sum < 50 && sum >= 30
    if r_score >= 50
      puts "C"
    else
      puts "D"
    end
  else 
    puts "F"
  end

}



Compiler output:
a.cc:1:1: error: 'loop' does not name a type
    1 | loop {
      | ^~~~
Language: C++

char scorejudge(int x, int y, int z){
	char scoreX;
	if (x + y >= 80)scoreX = 'A';
	else if (x + y >= 65)scoreX = 'B';
	else if (x + y >= 50)scoreX = 'C';
	else if (x + y >= 30 && z >= 50)scoreX = 'C';
	else if (x + y >= 30)scoreX = 'D';
	else scoreX = 'F';
	return scoreX;
}

int scoreinput(){
	int i = 0;

	for (;; i++){
		cin >> m[i] >> f[i] >> r[i];
		if (m[i] == -1 && f[i] == -1 && r[i] == -1)break;
	}

	return i;
}

int main(){
	int i=scoreinput();

	for (int j = 0; j < i; j++){
		cout << scorejudge(m[j], f[j], r[j]) << endl;
	}

	return 0;
}


Compiler output:
a.cc: In function 'int scoreinput()':
a.cc:16:17: error: 'cin' was not declared in this scope
   16 |                 cin >> m[i] >> f[i] >> r[i];
      |                 ^~~
a.cc:16:24: error: 'm' was not declared in this scope
   16 |                 cin >> m[i] >> f[i] >> r[i];
      |                        ^
a.cc:16:32: error: 'f' was not declared in this scope
   16 |                 cin >> m[i] >> f[i] >> r[i];
      |                                ^
a.cc:16:40: error: 'r' was not declared in this scope
   16 |                 cin >> m[i] >> f[i] >> r[i];
      |                                        ^
a.cc: In function 'int main()':
a.cc:27:17: error: 'cout' was not declared in this scope
   27 |                 cout << scorejudge(m[j], f[j], r[j]) << endl;
      |                 ^~~~
a.cc:27:36: error: 'm' was not declared in this scope
   27 |                 cout << scorejudge(m[j], f[j], r[j]) << endl;
      |                                    ^
a.cc:27:42: error: 'f' was not declared in this scope
   27 |                 cout << scorejudge(m[j], f[j], r[j]) << endl;
      |                                          ^
a.cc:27:48: error: 'r' was not declared in this scope
   27 |                 cout << scorejudge(m[j], f[j], r[j]) << endl;
      |                                                ^
a.cc:27:57: error: 'endl' was not declared in this scope
   27 |                 cout << scorejudge(m[j], f[j], r[j]) << endl;
      |                                                         ^~~~
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:30: error: expected primary-expression before ':' token
    8 |     if ( m == -1 || f == -1 ): cout << F << endl;
      |                              ^
a.cc:9:28: error: expected primary-expression before ':' token
    9 |     else if ( m + f >= 80 ): cout << A << endl;
      |                            ^
a.cc:10:42: error: expected primary-expression before ':' token
   10 |     else if ( 65 <= m + f && m + f < 80 ): cout << B << endl;
      |                                          ^
a.cc:11:42: error: expected primary-expression before ':' token
   11 |     else if ( 50 <= m + f && m + f < 65 ): cout << C << endl;
      |                                          ^
a.cc:12:27: error: expected primary-expression before ':' token
   12 |     else if ( m + f < 30 ): cout << F << endl;
      |                           ^
a.cc:13:52: error: expected primary-expression before ':' token
   13 |     else if ( 30 <= m + f && m + f < 50 && r < 50 ): cout << C << endl;
      |                                                    ^
a.cc:14:18: error: 'D' was not declared in this scope
   14 |     else cout << D << endl;
      |                  ^
Language: C++

#include <iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:8:39: error: 'F' was not declared in this scope
    8 |     if ( m == -1 || f == -1 ) cout << F << endl;
      |                                       ^
a.cc:9:37: error: 'A' was not declared in this scope
    9 |     else if ( m + f >= 80 ) cout << A << endl;
      |                                     ^
a.cc:10:51: error: 'B' was not declared in this scope
   10 |     else if ( 65 <= m + f && m + f < 80 ) cout << B << endl;
      |                                                   ^
a.cc:11:51: error: 'C' was not declared in this scope
   11 |     else if ( 50 <= m + f && m + f < 65 ) cout << C << endl;
      |                                                   ^
a.cc:12:36: error: 'F' was not declared in this scope
   12 |     else if ( m + f < 30 ) cout << F << endl;
      |                                    ^
a.cc:13:61: error: 'C' was not declared in this scope
   13 |     else if ( 30 <= m + f && m + f < 50 && r < 50 ) cout << C << endl;
      |                                                             ^
a.cc:14:18: error: 'D' was not declared in this scope
   14 |     else cout << D << endl;
      |                  ^
Language: C++

import java.util.*;
 
public class Main{
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in)){
            while(true){
                int m = sc.nextInt(), f = sc.nextInt(), 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){
                    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");
                }
            }
        }
    }
}

Compile Error Logs:

ステータス
Judge: 4/4	JAVA	CPU: 00:06 sec	Memory: 26052 KB	Length: 676 B	2017-07-14 20:43
テストケースの判定結果
Case #	Verdict	CPU Time	Memory	In	Out	Case Name
Case #1	: Accepted	00:05	25600	34	6	testcase_00
Case #2	: Accepted	00:05	25888	63	12	testcase_01
Case #3	: Accepted	00:06	25876	54	10	testcase_02
Case #4	: Accepted	00:06	26052	401	90	testcase_03

< prev |		/		| next >	 		
 
Judge Input #  ( | )		Judge Output #  ( | )



Compiler output:
a.cc:38:6: error: stray '#' in program
   38 | Case #  Verdict CPU Time        Memory  In      Out     Case Name
      |      ^
a.cc:39:6: error: stray '#' in program
   39 | Case #1 : Accepted      00:05   25600   34      6       testcase_00
      |      ^
a.cc:40:6: error: stray '#' in program
   40 | Case #2 : Accepted      00:05   25888   63      12      testcase_01
      |      ^
a.cc:41:6: error: stray '#' in program
   41 | Case #3 : Accepted      00:06   25876   54      10      testcase_02
      |      ^
a.cc:42:6: error: stray '#' in program
   42 | Case #4 : Accepted      00:06   26052   401     90      testcase_03
      |      ^
a.cc:46:13: error: stray '#' in program
   46 | Judge Input #  ( | )            Judge Output #  ( | )
      |             ^
a.cc:46:46: error: stray '#' in program
   46 | Judge Input #  ( | )            Judge 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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
a.cc:33:1: error: 'Compile' does not name a type
   33 | Compile Error Logs:
      | ^~~~~~~
Language: C++

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


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

import java.util.*;

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

        for(int i=0;i<50;i++){
            int m = sc.nextInt();
            int f = sc.nextInt();
            int r = sc.nextInt();

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


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:3:1: error: expected unqualified-id before 'public'
    3 | public class Main{
      | ^~~~~~
Language: C++

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

int main(){

int a[100];
int d
for(int i=0;;i++){
int m,f,r;
cin>>m>>f>>r;
if(m==-1 && f==-1 && r==-1){d=i; break;}
if(m==-1 || f==-1){a[i]=-1; continue;}
if(m+f>=80){a[i]=3; continue;}
if(m+f>=65){a[i]=2; continue;}
if(m+f>=60){a[i]=1; continue;}
if(m+f>=30 && r>=50){a[i]=1; continue;}
if(m+f>=30){a[i]=0; continue;}
a[i]=-1;
}

for(int i=0;i<d;i++){
if(a[i]==-1){cout<<"F"<<endl;}
if(a[i]==0){cout<<"D"<<endl;}
if(a[i]==1){cout<<"C"<<endl;}
if(a[i]==2){cout<<"B"<<endl;}
if(a[i]==3){cout<<"A"<<endl;}
}

return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:8:1: error: expected initializer before 'for'
    8 | for(int i=0;;i++){
      | ^~~
a.cc:8:14: error: 'i' was not declared in this scope
    8 | for(int i=0;;i++){
      |              ^
a.cc:21:15: error: 'd' was not declared in this scope
   21 | for(int i=0;i<d;i++){
      |               ^
Language: C++

#include <bits/stdc++>
using namespace

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


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++>
using namespace std;

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


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++>
using namespace std;

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


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++>
using namespace std;

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


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(){
    while(1){
    int m,f,r;
    cin >>m>>f>>r;
    if (m==-1&&f==-1 && r == -1) break;
    string ans; 
    if (m== -1 || f == -1) ans = "F";
    if(m+f>= 80) ans = "A";
    if(m+f>= 65) ans = "B";
    if (m+f>=50) ans = "C";
    if(m+f >=30) {
        if (r >=50) ans ="C";
        else ans ="D";
        
    }
    else ans = "F";
    cout <<ans<<ensl;
    }
}


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

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

int main(){
    int n;
    cin >> n;
    int a[100];
    for(int i = 0;i<n;i++) cin >>a[i];
    for(int i = 0;i<n-1-i;i++){
       if (i)cout <<" ";
       cout <<a[i];

    }
    cout<<endl;
 }


Compiler output:
a.cc:1:9: 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 n;
    cin >> n;
    int a[100];
    for(int i = 0;i<n;i++) cin >>a[i];
    for (int i=0;i<n;i++)swap(a[i],a[n-1-i])
    for(int i = 0;i<n-1-i;i++){
       if (i)cout <<" ";
       cout <<a[i];

    }
    cout<<endl;
    return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:9:45: error: expected ';' before 'for'
    9 |     for (int i=0;i<n;i++)swap(a[i],a[n-1-i])
      |                                             ^
      |                                             ;
   10 |     for(int i = 0;i<n-1-i;i++){
      |     ~~~                                      
a.cc:10:19: error: 'i' was not declared in this scope
   10 |     for(int i = 0;i<n-1-i;i++){
      |                   ^
Language: C++

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

int main(){
    int n;
    cin >> n;
    int a[100];
    for(int i = 0;i<n;i++) cin >>a[i];
    
    for (int i=0;i<n-1-i;i++)swap(a[i],a[n-1-i])
    
    for(int i = 0;i<n-1-i;i++){
       if (i)cout <<" ";
       cout <<a[i];

    }
    cout<<endl;
    return 0;
 }


Compiler output:
a.cc: In function 'int main()':
a.cc:10:49: error: expected ';' before 'for'
   10 |     for (int i=0;i<n-1-i;i++)swap(a[i],a[n-1-i])
      |                                                 ^
      |                                                 ;
   11 | 
   12 |     for(int i = 0;i<n-1-i;i++){
      |     ~~~                                          
a.cc:12:19: error: 'i' was not declared in this scope
   12 |     for(int i = 0;i<n-1-i;i++){
      |                   ^
Language: C++

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

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: expected primary-expression before '>>' token
    7 |     cin >> m >> >>f>>r;
      |                 ^~
Language: C++

int main(){
  int m,f,r;
  while(1){
    cin >> m >> f >> r;
    if(m == -1 && f == -1 && r == -1)break;
    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 && r  >= 50) cout << "C"<<endl;
    if(m + f >= 30 && m + f < 50 && r  < 50 ) cout << "D" << endl;
    if(m + f < 30)cout << "F" << endl;}
		  
		
}


Compiler output:
a.cc: In function 'int main()':
a.cc:4:5: error: 'cin' was not declared in this scope
    4 |     cin >> m >> f >> r;
      |     ^~~
a.cc:6:20: error: 'cout' was not declared in this scope
    6 |     if(m + f >= 80)cout << "A" <<endl;
      |                    ^~~~
a.cc:6:34: error: 'endl' was not declared in this scope
    6 |     if(m + f >= 80)cout << "A" <<endl;
      |                                  ^~~~
a.cc:7:35: error: 'cout' was not declared in this scope
    7 |     if(m + f >= 65 && m + f < 80) cout << "B" << endl;
      |                                   ^~~~
a.cc:7:50: error: 'endl' was not declared in this scope
    7 |     if(m + f >= 65 && m + f < 80) cout << "B" << endl;
      |                                                  ^~~~
a.cc:8:35: error: 'cout' was not declared in this scope
    8 |     if(m + f >= 50 && m + f < 65) cout << "C" << endl;
      |                                   ^~~~
a.cc:8:50: error: 'endl' was not declared in this scope
    8 |     if(m + f >= 50 && m + f < 65) cout << "C" << endl;
      |                                                  ^~~~
a.cc:9:47: error: 'cout' was not declared in this scope
    9 |     if(m + f >= 30 && m + f < 50 && r  >= 50) cout << "C"<<endl;
      |                                               ^~~~
a.cc:9:60: error: 'endl' was not declared in this scope
    9 |     if(m + f >= 30 && m + f < 50 && r  >= 50) cout << "C"<<endl;
      |                                                            ^~~~
a.cc:10:47: error: 'cout' was not declared in this scope
   10 |     if(m + f >= 30 && m + f < 50 && r  < 50 ) cout << "D" << endl;
      |                                               ^~~~
a.cc:10:62: error: 'endl' was not declared in this scope
   10 |     if(m + f >= 30 && m + f < 50 && r  < 50 ) cout << "D" << endl;
      |                                                              ^~~~
a.cc:11:19: error: 'cout' was not declared in this scope
   11 |     if(m + f < 30)cout << "F" << endl;}
      |                   ^~~~
a.cc:11:34: error: 'endl' was not declared in this scope
   11 |     if(m + f < 30)cout << "F" << endl;}
      |                                  ^~~~
Language: C++

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


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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:3: error: 'imt' was not declared in this scope; did you mean 'int'?
    7 |   imt m,f,r;
      |   ^~~
      |   int
a.cc:8:8: error: 'm' was not declared in this scope; did you mean 'tm'?
    8 |   cin>>m>>f>>r;
      |        ^
      |        tm
a.cc:8:11: error: 'f' was not declared in this scope
    8 |   cin>>m>>f>>r;
      |           ^
a.cc:8:14: error: 'r' was not declared in this scope
    8 |   cin>>m>>f>>r;
      |              ^
a.cc:16:25: error: expected ';' before 'else'
   16 |    if(r >= 50) ans = "C"
      |                         ^
      |                         ;
   17 |    else ans = "D"
      |    ~~~~                  
a.cc:19:11: error: expected ';' before string constant
   19 |   else ans "F"
      |           ^~~~
      |           ;
Language: C++

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


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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:16:25: error: expected ';' before 'else'
   16 |    if(r >= 50) ans = "C"
      |                         ^
      |                         ;
   17 |    else ans = "D"
      |    ~~~~                  
a.cc:19:11: error: expected ';' before string constant
   19 |   else ans "F"
      |           ^~~~
      |           ;
Language: C++

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


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

  return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:19:11: error: expected ';' before string constant
   19 |   else ans "F";
      |           ^~~~
      |           ;
Language: C++

#include "iostram"
using namespace std;

int main(int argc, char const *argv[])
{
	int m, f, r=0
	int  Score;
	char Grade;
	while(true)
	{
		cin >> m >> f >> r;
		if(m==-1 && f==-1 && r==-1)
		{
			break;
		}
		Score = m + f;

		if(m==-1 || f==-1 || Score<30)
		{
			Grade = 'F'
		}
		else if(Score>=80)
		{
			Grade = 'A'
		}
		else if (80>Score>=65)
		{
			Grade = 'B'
		}
		else if (65>Score>=50)
		{
			Grade = 'C'
		}
		else if (50>Score>=30)
		{
			if(r>=50)
			{
				Grade = 'C'
			}
			else
			{
				Grade = 'D'
			}
		}

		cout << Grade<< endl;
	}
	return 0;
}


Compiler output:
a.cc:1:10: fatal error: iostram: No such file or directory
    1 | #include "iostram"
      |          ^~~~~~~~~
compilation terminated.
Language: C++

de<iostream>
using namespace std;

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



Compiler output:
a.cc:1:1: error: 'de' does not name a type
    1 | de<iostream>
      | ^~
a.cc: In function 'int main()':
a.cc:7:5: error: 'cin' was not declared in this scope
    7 |     cin>>m[i]>>f[i]>>r[i];
      |     ^~~
a.cc:15:30: error: 'cout' was not declared in this scope
   15 |     if(m[i]==-1 || f[i]==-1) cout<<"F"<<endl;
      |                              ^~~~
a.cc:15:41: error: 'endl' was not declared in this scope; did you mean 'end'?
   15 |     if(m[i]==-1 || f[i]==-1) cout<<"F"<<endl;
      |                                         ^~~~
      |                                         end
a.cc:16:21: error: 'cout' was not declared in this scope
   16 |     else if(sum>=80)cout<<"A"<<endl;
      |                     ^~~~
a.cc:16:32: error: 'endl' was not declared in this scope; did you mean 'end'?
   16 |     else if(sum>=80)cout<<"A"<<endl;
      |                                ^~~~
      |                                end
a.cc:17:21: error: 'cout' was not declared in this scope
   17 |     else if(sum>=65)cout<<"B"<<endl;
      |                     ^~~~
a.cc:17:32: error: 'endl' was not declared in this scope; did you mean 'end'?
   17 |     else if(sum>=65)cout<<"B"<<endl;
      |                                ^~~~
      |                                end
a.cc:18:21: error: 'cout' was not declared in this scope
   18 |     else if(sum>=50)cout<<"C"<<endl;
      |                     ^~~~
a.cc:18:32: error: 'endl' was not declared in this scope; did you mean 'end'?
   18 |     else if(sum>=50)cout<<"C"<<endl;
      |                                ^~~~
      |                                end
a.cc:20:19: error: 'cout' was not declared in this scope
   20 |       if(r[i]>=50)cout<<"C"<<endl;
      |                   ^~~~
a.cc:20:30: error: 'endl' was not declared in this scope; did you mean 'end'?
   20 |       if(r[i]>=50)cout<<"C"<<endl;
      |                              ^~~~
      |                              end
a.cc:21:12: error: 'cout' was not declared in this scope
   21 |       else cout<<"D"<<endl;
      |            ^~~~
a.cc:21:23: error: 'endl' was not declared in this scope; did you mean 'end'?
   21 |       else cout<<"D"<<endl;
      |                       ^~~~
      |                       end
a.cc:23:10: error: 'cout' was not declared in this scope
   23 |     else cout<<"F"<<endl;
      |          ^~~~
a.cc:23:21: error: 'endl' was not declared in this scope; did you mean 'end'?
   23 |     else cout<<"F"<<endl;
      |                     ^~~~
      |                     end