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

#include<stdio.h>
using namespace std;
中間試験、期末試験のいずれかを欠席した場合成績は F。
中間試験と期末試験の合計点数が 80 以上ならば成績は A 。
中間試験と期末試験の合計点数が 65 以上 80 未満ならば成績は B。
中間試験と期末試験の合計点数が 50 以上 65 未満ならば成績は C。
中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
中間試験と期末試験の合計点数が 30 未満ならば成績は F。
int main(){
    while(true){
        int m,f,r;
        scanf("%d%d%d",&m,&f,&r);
        if(m==-1&&f==-1&&r==-1)break;
        if(m==-1 || f==-1)printf("F\n");
        if(m+f>=80)printf("A\n");
        if(m+f>=65&&m+f<80)printf("B\n");
        if(m+f>=50&&m+f<65)printf("C\n");
        if(m+f>=30&&m+f<50){
            if(r>=50)printf("C\n");
            else printf("D\n");
        }
        if(m+f<30)printf("F\n");
    }
    
    
}


Compiler output:
a.cc:3:1: error: extended character 、 is not valid in an identifier
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      | ^
a.cc:3:50: error: extended character 。 is not valid in an identifier
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      |                                                  ^
a.cc:4:54: error: extended character 。 is not valid in an identifier
    4 | 中間試験と期末試験の合計点数が 80 以上ならば成績は A 。
      |                                                      ^
a.cc:5:60: error: extended character 。 is not valid in an identifier
    5 | 中間試験と期末試験の合計点数が 65 以上 80 未満ならば成績は B。
      |                                                            ^
a.cc:6:60: error: extended character 。 is not valid in an identifier
    6 | 中間試験と期末試験の合計点数が 50 以上 65 未満ならば成績は C。
      |                                                            ^
a.cc:7:60: error: extended character 。 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                            ^
a.cc:7:64: error: extended character 、 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                                ^
a.cc:7:107: error: extended character 。 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                                                                           ^
a.cc:8:52: error: extended character 。 is not valid in an identifier
    8 | 中間試験と期末試験の合計点数が 30 未満ならば成績は F。
      |                                                    ^
a.cc:3:1: error: '\U00004e2d\U00009593\U00008a66\U00009a13\U00003001\U0000671f\U0000672b\U00008a66\U00009a13\U0000306e\U00003044\U0000305a\U0000308c\U0000304b\U00003092\U00006b20\U00005e2d\U00003057\U0000305f\U00005834\U00005408\U00006210\U00007e3e\U0000306f' does not name a type
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Language: C++

#include<stdio.h>
using namespace std;
中間試験、期末試験のいずれかを欠席した場合成績は F。
中間試験と期末試験の合計点数が 80 以上ならば成績は A 。
中間試験と期末試験の合計点数が 65 以上 80 未満ならば成績は B。
中間試験と期末試験の合計点数が 50 以上 65 未満ならば成績は C。
中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
中間試験と期末試験の合計点数が 30 未満ならば成績は F。
int main(){
    while(true){
        int m,f,r;
        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&&m+f<80)printf("B\n");
        else if(m+f>=50&&m+f<65)printf("C\n");
        else if(m+f>=30&&m+f<50){
            if(r>=50)printf("C\n");
            else printf("D\n");
        }
        else if(m+f<30)printf("F\n");
    }
    
    
}


Compiler output:
a.cc:3:1: error: extended character 、 is not valid in an identifier
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      | ^
a.cc:3:50: error: extended character 。 is not valid in an identifier
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      |                                                  ^
a.cc:4:54: error: extended character 。 is not valid in an identifier
    4 | 中間試験と期末試験の合計点数が 80 以上ならば成績は A 。
      |                                                      ^
a.cc:5:60: error: extended character 。 is not valid in an identifier
    5 | 中間試験と期末試験の合計点数が 65 以上 80 未満ならば成績は B。
      |                                                            ^
a.cc:6:60: error: extended character 。 is not valid in an identifier
    6 | 中間試験と期末試験の合計点数が 50 以上 65 未満ならば成績は C。
      |                                                            ^
a.cc:7:60: error: extended character 。 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                            ^
a.cc:7:64: error: extended character 、 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                                ^
a.cc:7:107: error: extended character 。 is not valid in an identifier
    7 | 中間試験と期末試験の合計点数が 30 以上 50 未満ならば成績は D。 ただし、再試験の点数が 50 以上ならば成績は C。
      |                                                                                                           ^
a.cc:8:52: error: extended character 。 is not valid in an identifier
    8 | 中間試験と期末試験の合計点数が 30 未満ならば成績は F。
      |                                                    ^
a.cc:3:1: error: '\U00004e2d\U00009593\U00008a66\U00009a13\U00003001\U0000671f\U0000672b\U00008a66\U00009a13\U0000306e\U00003044\U0000305a\U0000308c\U0000304b\U00003092\U00006b20\U00005e2d\U00003057\U0000305f\U00005834\U00005408\U00006210\U00007e3e\U0000306f' does not name a type
    3 | 中間試験、期末試験のいずれかを欠席した場合成績は F。
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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||m+f<30) cout<<"F"<<endl;
         else if(m+f<50){
             if(r>=50) cout<<"C"<<endl;
             else cout<<"D"<<endl;
         }
         else if(m+f<65) cout<<"C"<<endl;
         else if(m+f<80) cout<<"B"<<endl;
         else cout<<"A"<<endl;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: lvalue required as left operand of assignment
    7 |          if(m=-1||f=-1||m+f<30) cout<<"F"<<endl;
      |               ~~^~~
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||m+f<30) cout<<"F"<<endl;
         else if(m+f<50){
             if(r>=50) cout<<"C"<<endl;
             else cout<<"D"<<endl;
         }
         else if(m+f<65) cout<<"C"<<endl;
         else if(m+f<80) cout<<"B"<<endl;
         else cout<<"A"<<endl;
         cin >> m >> f >> r;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: lvalue required as left operand of assignment
    7 |          if(m=-1||f=-1||m+f<30) cout<<"F"<<endl;
      |               ~~^~~
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;
         else if(m+f<30) cout<<"F"<<endl;
         else if(m+f<50){
             if(r>=50) cout<<"C"<<endl;
             else cout<<"D"<<endl;
         }
         else if(m+f<65) cout<<"C"<<endl;
         else if(m+f<80) cout<<"B"<<endl;
         else cout<<"A"<<endl;
         cin >> m >> f >> r;
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:17: error: lvalue required as left operand of assignment
    7 |          if(m=-1||f=-1) cout<<"F"<<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;
 
 char result;
 if(m == -1 || f == -1){
    result = 'F';
 }else if(m + f >= 80){
    result = 'A';
 }else if(m + f >= 65){
    result = 'B';
 }else if(m + f >= 50){
    result = 'C';
 }else if(m + f >= 30 && r >= 50){
    result = 'C';
 }else if(m + f >= 30 && r < 50){
    result = 'D';
 }else{
    result = 'F';
 }
return 0;
} 


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

#inckude<stdio.h>

int main(){
    int m,f,r;
    while(scanf("%d %d %d",&m,&f,&r) && ((m != -1 || f != -1) && (f != -1 || r != -1))){
        if(m == 0 || f == 0){
            printf("F");
        } else if( m+f >= 80){
            printf("A");
        } else if(m+f >= 65 && m+f < 80 ){
            printf("B");
        } else if(m+f >= 50 && m+f < 65){
            printf("D");
        } else if(m+f => 30 && m+f < 50){
            if(r >= 50){
                printf("C");
            } else {
                printf("D");
            }
        } else if(m+f < 30){
            printf("F");
        }
    }
    return 0;
}


Compiler output:
a.cc:1:2: error: invalid preprocessing directive #inckude; did you mean #include?
    1 | #inckude<stdio.h>
      |  ^~~~~~~
      |  include
a.cc: In function 'int main()':
a.cc:5:11: error: 'scanf' was not declared in this scope
    5 |     while(scanf("%d %d %d",&m,&f,&r) && ((m != -1 || f != -1) && (f != -1 || r != -1))){
      |           ^~~~~
a.cc:7:13: error: 'printf' was not declared in this scope
    7 |             printf("F");
      |             ^~~~~~
a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
  +++ |+#include <cstdio>
    1 | #inckude<stdio.h>
a.cc:9:13: error: 'printf' was not declared in this scope
    9 |             printf("A");
      |             ^~~~~~
a.cc:9:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:11:13: error: 'printf' was not declared in this scope
   11 |             printf("B");
      |             ^~~~~~
a.cc:11:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:13:13: error: 'printf' was not declared in this scope
   13 |             printf("D");
      |             ^~~~~~
a.cc:13:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:14:24: error: expected primary-expression before '>' token
   14 |         } else if(m+f => 30 && m+f < 50){
      |                        ^
a.cc:16:17: error: 'printf' was not declared in this scope
   16 |                 printf("C");
      |                 ^~~~~~
a.cc:16:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:18:17: error: 'printf' was not declared in this scope
   18 |                 printf("D");
      |                 ^~~~~~
a.cc:18:17: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
a.cc:21:13: error: 'printf' was not declared in this scope
   21 |             printf("F");
      |             ^~~~~~
a.cc:21:13: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include<stdio.h>

int main(){
    int m,f,r;
    while(scanf("%d %d %d",&m,&f,&r) && ((m != -1 || f != -1) && (f != -1 || r != -1))){
        if(m == 0 || f == 0){
            printf("F");
        } else if( m+f >= 80){
            printf("A");
        } else if(m+f >= 65 && m+f < 80 ){
            printf("B");
        } else if(m+f >= 50 && m+f < 65){
            printf("D");
        } else if(m+f => 30 && m+f < 50){
            if(r >= 50){
                printf("C");
            } else {
                printf("D");
            }
        } else if(m+f < 30){
            printf("F");
        }
    }
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:14:24: error: expected primary-expression before '>' token
   14 |         } else if(m+f => 30 && m+f < 50){
      |                        ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'k' was not declared in this scope
    7 |         if(m==-1 && k==-1 && r==-1)break;
      |                     ^
a.cc:9:16: error: 'k' was not declared in this scope
    9 |     if(m==-1 | k==-1){
      |                ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'k' was not declared in this scope
    7 |         if(m==-1 && k==-1 && r==-1)break;
      |                     ^
a.cc:9:20: error: 'k' was not declared in this scope
    9 |         if(m==-1 | k==-1){
      |                    ^
Language: C++

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


Compiler output:
a.cc: In function 'int main()':
a.cc:7:21: error: 'k' was not declared in this scope
    7 |         if(m==-1 && k==-1 && r==-1)break;
      |                     ^
a.cc:9:20: error: 'k' was not declared in this scope
    9 |         if(m==-1 | k==-1){
      |                    ^
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{
            int a=m+r;
            if(a>=80) cout << "A" << endl;
            else if(a>=65) cout << "B"<<endl;
            else if(a>=50) cout << "C"<<endl;
            else if(a>=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:13:16: error: expected '(' before '{' token
   13 |         else if{
      |                ^
      |                (
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{
            int a=m+r;
            if(a>=80){ 
                cout << "A" << endl;
            }
            else if(a>=65){
                 cout << "B"<<endl;
            }
            else if(a>=50){
                cout << "C"<<endl;
            }
            else if(a>=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:15:16: error: expected '(' before '{' token
   15 |         else if{
      |                ^
      |                (
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) && ((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)){
            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:9:28: error: expected primary-expression before '%' token
    9 |         if(m==-1 && f==-1 %% r==-1) break;
      |                            ^
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:15:31: error: expected ';' before 'else'
   15 |         else if(m+f<30) g=='F'
      |                               ^
      |                               ;
   16 |         else if(m=-1&&f=-1&&r=-1) break;
      |         ~~~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: lvalue required as left operand of assignment
   16 |         else if(m=-1&&f=-1&&r=-1) break;
      |                         ~~^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:16:27: error: lvalue required as left operand of assignment
   16 |         else if(m=-1&&f=-1&&r=-1) break;
      |                         ~~^~~
Language: C++

#include<iostream>
using namespace std;

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


Compiler output:
a.cc: In function 'int main()':
a.cc:17:27: error: lvalue required as left operand of assignment
   17 |         else if(m=-1&&f=-1&&r=-1) break;
      |                         ~~^~~
Language: C++

#include<cstdio

int main(){
    char g;
    int m,f,r;
    scanf("%d %d %d", &m, &f, &r);

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


Compiler output:
a.cc:1:16: error: missing terminating > character
    1 | #include<cstdio
      |                ^
Language: C++

#include<iostream>
using namespace std;

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

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


Compiler output:
a.cc: In function 'char g(int, int, int)':
a.cc:5:9: error: declaration of 'int m' shadows a parameter
    5 |     int m,f,r;
      |         ^
a.cc:4:12: note: 'int m' previously declared here
    4 | char g(int m, int f, int r){
      |        ~~~~^
a.cc:5:11: error: declaration of 'int f' shadows a parameter
    5 |     int m,f,r;
      |           ^
a.cc:4:19: note: 'int f' previously declared here
    4 | char g(int m, int f, int r){
      |               ~~~~^
a.cc:5:13: error: declaration of 'int r' shadows a parameter
    5 |     int m,f,r;
      |             ^
a.cc:4:26: note: 'int r' previously declared here
    4 | char g(int m, int f, int r){
      |                      ~~~~^
a.cc:7:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    7 |     if(m==-1||f==-1) g=='F';
      |                      ~^~~~~
a.cc:8:23: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    8 |     else if(m+f<=80) g=='A';
      |                      ~^~~~~
a.cc:9:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    9 |     else if(65<=m+f&&m+f<80) g=='B';
      |                              ~^~~~~
a.cc:10:31: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   10 |     else if(50<=m+f&&m+f<65) g=='C';
      |                              ~^~~~~
a.cc:11:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   11 |     else if(30<=m+f&&m+f<50&&50<=r) g=='C';
      |                                     ~^~~~~
a.cc:12:37: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   12 |     else if(30<=m+f&&m+f<50&&r<50) g=='D';
      |                                    ~^~~~~
a.cc:13:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   13 |     else if(m+f<30) g=='F';
      |                     ~^~~~~
a.cc:14:1: warning: no return statement in function returning non-void [-Wreturn-type]
   14 | }
      | ^
Language: C++

#include<iostream>
using namespace std;

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

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


Compiler output:
a.cc: In function 'char getg(int, int, int)':
a.cc:5:9: error: declaration of 'int m' shadows a parameter
    5 |     int m,f,r;
      |         ^
a.cc:4:15: note: 'int m' previously declared here
    4 | char getg(int m, int f, int r){
      |           ~~~~^
a.cc:5:11: error: declaration of 'int f' shadows a parameter
    5 |     int m,f,r;
      |           ^
a.cc:4:22: note: 'int f' previously declared here
    4 | char getg(int m, int f, int r){
      |                  ~~~~^
a.cc:5:13: error: declaration of 'int r' shadows a parameter
    5 |     int m,f,r;
      |             ^
a.cc:4:29: note: 'int r' previously declared here
    4 | char getg(int m, int f, int r){
      |                         ~~~~^
a.cc:8:9: error: 'g' was not declared in this scope
    8 |         g=='F'
      |         ^
a.cc:10:9: error: 'g' was not declared in this scope
   10 |         g=='A'
      |         ^
a.cc:12:9: error: 'g' was not declared in this scope
   12 |         g=='B'
      |         ^
a.cc:14:9: error: 'g' was not declared in this scope
   14 |         g=='C'
      |         ^
a.cc:16:9: error: 'g' was not declared in this scope
   16 |         g=='C'
      |         ^
a.cc:18:9: error: 'g' was not declared in this scope
   18 |         g=='D'
      |         ^
a.cc:20:9: error: 'g' was not declared in this scope
   20 |         g=='F'
      |         ^
a.cc:23:12: error: 'g' was not declared in this scope
   23 |     return g;
      |            ^
a.cc: In function 'int main()':
a.cc:31:15: error: 'g' was not declared in this scope
   31 |         cout<<g(m,f,r)<<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(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&&r>=50) {
        grade=='C'
    } else if(30<=sum&&sum<50&&r<50) {
        grade=='D'
    } else if(30<sum) {
        grade=='F'
    }
    
    return grade;
}

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


Compiler output:
a.cc: In function 'char getGrade(int, int, int)':
a.cc:9:19: error: expected ';' before '}' token
    9 |         grade=='F'
      |                   ^
      |                   ;
   10 |     } else if(sum>=80) {
      |     ~              
a.cc:11:19: error: expected ';' before '}' token
   11 |         grade=='A'
      |                   ^
      |                   ;
   12 |     } else if(65<=sum&&sum<80) {
      |     ~              
a.cc:13:19: error: expected ';' before '}' token
   13 |         grade=='B'
      |                   ^
      |                   ;
   14 |     } else if(50<=sum&&sum<65) {
      |     ~              
a.cc:15:19: error: expected ';' before '}' token
   15 |         grade=='C'
      |                   ^
      |                   ;
   16 |     } else if(30<=sum&&sum<50&&r>=50) {
      |     ~              
a.cc:17:19: error: expected ';' before '}' token
   17 |         grade=='C'
      |                   ^
      |                   ;
   18 |     } else if(30<=sum&&sum<50&&r<50) {
      |     ~              
a.cc:19:19: error: expected ';' before '}' token
   19 |         grade=='D'
      |                   ^
      |                   ;
   20 |     } else if(30<sum) {
      |     ~              
a.cc:21:19: error: expected ';' before '}' token
   21 |         grade=='F'
      |                   ^
      |                   ;
   22 |     }
      |     ~              
a.cc: In function 'int main()':
a.cc:33:15: error: 'grade' was not declared in this scope
   33 |         cout<<grade(m,f,r)<<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(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&&r>=50) {
        grade=='C'
    } else if(30<=sum&&sum<50&&r<50) {
        grade=='D'
    } else if(30<sum) {
        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:19: error: expected ';' before '}' token
    9 |         grade=='F'
      |                   ^
      |                   ;
   10 |     } else if(sum>=80) {
      |     ~              
a.cc:11:19: error: expected ';' before '}' token
   11 |         grade=='A'
      |                   ^
      |                   ;
   12 |     } else if(65<=sum&&sum<80) {
      |     ~              
a.cc:13:19: error: expected ';' before '}' token
   13 |         grade=='B'
      |                   ^
      |                   ;
   14 |     } else if(50<=sum&&sum<65) {
      |     ~              
a.cc:15:19: error: expected ';' before '}' token
   15 |         grade=='C'
      |                   ^
      |                   ;
   16 |     } else if(30<=sum&&sum<50&&r>=50) {
      |     ~              
a.cc:17:19: error: expected ';' before '}' token
   17 |         grade=='C'
      |                   ^
      |                   ;
   18 |     } else if(30<=sum&&sum<50&&r<50) {
      |     ~              
a.cc:19:19: error: expected ';' before '}' token
   19 |         grade=='D'
      |                   ^
      |                   ;
   20 |     } else if(30<sum) {
      |     ~              
a.cc:21:19: error: expected ';' before '}' token
   21 |         grade=='F'
      |                   ^
      |                   ;
   22 |     }
      |     ~
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&&r>=50) {
        grade=='C';
    } else if(30<=sum&&sum<50&&r<50) {
        grade=='D';
    } else if(30<sum) {
        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:19: error: expected ';' before '}' token
    9 |         grade=='F'
      |                   ^
      |                   ;
   10 |     } else if(sum>=80) {
      |     ~
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&&r>=50) {
        grade=='C';
    } else if(30<=sum&&sum<50&&r<50) {
        grade=='D';
    } else if(30<sum) {
        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:19: error: expected ';' before '}' token
    9 |         grade=='F'
      |                   ^
      |                   ;
   10 |     } else if(80<=sum) {
      |     ~
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';
        if(r<50) {
            grade=='D';
    } else if(30<sum) {
        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:28:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   28 | int main(){
      |         ^~
a.cc:28:9: note: remove parentheses to default-initialize a variable
   28 | int main(){
      |         ^~
      |         --
a.cc:28:9: note: or replace parentheses with braces to value-initialize a variable
a.cc:28:11: error: a function-definition is not allowed here before '{' token
   28 | int main(){
      |           ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:16:32: note: to match this '{'
   16 |     } else if(30<=sum&&sum<50) {
      |                                ^
a.cc:38:2: error: expected '}' at end of input
   38 | }
      |  ^
a.cc:4:35: note: to match this '{'
    4 | char getGrade(int m, int f, int r){ //文字の中にイント型
      |                                   ^
a.cc:38:2: warning: control reaches end of non-void function [-Wreturn-type]
   38 | }
      |  ^
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+f>=65&&m+f<80){
            cout<<"B"<<endl;
        }
        else if(m+f>=80){
            cout<<"A"<<endl;
        }
        else if(m+f>=50&&m+f<65){
             cout<<"C"<<endl;
        }
        else if(m+f>=30&&m+f<50){
            if(r>=50){
                cout<<"C"<<endl;
            }    
            else(){
                cout<<"D"<<endl;
            }
        }
        else if(m+f<30){
            cout<<"F"<<endl;
        }
        else if(m==-1 ||f==-1 ){
            cout<<"F"<<endl;
        }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:7:18: error: expected primary-expression before '%' token
    7 |         if(m==-1%%f==-1&&r==-1){
      |                  ^
a.cc:23:18: error: expected primary-expression before ')' token
   23 |             else(){
      |                  ^
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+f>=65&&m+f<80){
            cout<<"B"<<endl;
        }
        else if(m+f>=80){
            cout<<"A"<<endl;
        }
        else if(m+f>=50&&m+f<65){
             cout<<"C"<<endl;
        }
        else if(m+f>=30&&m+f<50){
            if(r>=50){
                cout<<"C"<<endl;
            }    
            else(){
                cout<<"D"<<endl;
            }
        }
        else if(m+f<30){
            cout<<"F"<<endl;
        }
        else if(m==-1 ||f==-1 ){
            cout<<"F"<<endl;
        }
    }
    
    return 0;
}


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

#include<iostream>
#include<string>
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+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<<''<<endl;
		else if(m+f>=30&&m+f<50){
			cout<<'D'<<endl;
			if(r>=50)
				cout<<'C'<<endl;
		}
		else if(m+f<30)
			cout<<'F'<<endl;
		else if(m==-1||f==-1)
			cout<<'F'<<endl;
		
	}
	return 0;
}



Compiler output:
a.cc:15:31: error: empty character constant
   15 |                         cout<<''<<endl;
      |                               ^~
Language: C++

#include<iostream>
#include<string>
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+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){
			cout<<'D'<<endl;
			if(r>=50)
				cout<<'C'<<endl;
		}
		else if(m+f<30)
			cout<<'F'<<endl;
		else if(m==-1||f==-1)
			cout<<'F'<<endl;
		else(){
		    
		}
		
	}
	return 0;
}



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

#include<iostream>
#include<string>
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+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){
			cout<<'D'<<endl;
		else if(m+f>=30&&m+f<50&&r>=50)
			cout<<'C'<<endl;
		}
		else if(m+f<30)
			cout<<'F'<<endl;
		else if(m==-1||f==-1)
			cout<<'F'<<endl;
		
		
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:18:17: error: expected '}' before 'else'
   18 |                 else if(m+f>=30&&m+f<50&&r>=50)
      |                 ^~~~
a.cc:16:41: note: to match this '{'
   16 |                 else if(m+f>=30&&m+f<50){
      |                                         ^
a.cc:21:17: error: 'else' without a previous 'if'
   21 |                 else if(m+f<30)
      |                 ^~~~
a.cc: At global scope:
a.cc:28:9: error: expected unqualified-id before 'return'
   28 |         return 0;
      |         ^~~~~~
a.cc:29:1: error: expected declaration before '}' token
   29 | }
      | ^
Language: C++

#include<iostream>
#include<string>
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
		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(r>=50)
				cout<<'C'<<endl
		}
		if(m+f<30)
			cout<<'F'<<endl
		if(m==-1||f==-1)
			cout<<'F'<<endl
		
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:11:40: error: expected ';' before 'if'
   11 |                         cout<<'A'<<endl
      |                                        ^
      |                                        ;
   12 |                 if(m+f>=65&&m+f<80)
      |                 ~~                      
a.cc:22:40: error: expected ';' before 'if'
   22 |                         cout<<'F'<<endl
      |                                        ^
      |                                        ;
   23 |                 if(m==-1||f==-1)
      |                 ~~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int m,f,r;
	while(true){
		cin>>m>>f>>r;
		if(m==-1&&f==-1&&r==-1){
			break;
		}
		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){
			if(r>=50){
				cout<<"C"<<endl;
			}
			else(){
			    cout<<"D"<<endl;
			}
		}
		else if(m+f<30){
			cout<<"F"<<endl;
		}
		else if(m==-1||f==-1){
			cout<<"F"<<endl;
		}
	}
	return 0;
}



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

#include<iostream>
using namespace std;
int main(){
    int m,f,r;
	while(true){
		cin>>m>>f>>r;
		if(m==-1&&f==-1&&r==-1){
			break;
		}
		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){
			if(r>=50){
				cout<<"C"<<endl;
			}
			else{
			    cout<<"D"<<endl;
			}
		}
		else if(m+f<30){
			cout<<"F"<<endl;
		}
		else if(m==-1||f==-1){
			cout<<"F"<<endl;
		}
		break
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:33:22: error: expected ';' before '}' token
   33 |                 break
      |                      ^
      |                      ;
   34 |         }
      |         ~
Language: C++

#include<iostream>
using namespace std;
int main(){
    int m,f,r;
	while(true){
		cin>>m>>f>>r;
		if(m==-1&&f==-1&&r==-1){
			break;
		}
		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){
			if(r>=50){
				cout<<"C"<<endl;
			}
			else{
			    cout<<"D"<<endl;
			}
		}
		else if(m+f<30){
			cout<<"F"<<endl;
		}
		else if(m==-1||f==-1){
			cout<<"F"<<endl;
		}
		else{
		    break
		}
	}
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:34:26: error: expected ';' before '}' token
   34 |                     break
      |                          ^
      |                          ;
   35 |                 }
      |                 ~
Language: C++

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



Compiler output:
a.cc: In function 'int main()':
a.cc:6:9: error: expected initializer before 'while'
    6 |         while(true){
      |         ^~~~~
Language: C++

#include <iostream>
using namespace std;

int main(){
	int m,f,r;
	while(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:7:37: error: lvalue required as left operand of assignment
    7 |                 if(m = -1 && f = -1 && r = -1){
      |                                  ~~~^~~~
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 && 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 && r<50){
            cout<<"D"<<endl;
        }
        else if(m+F<30){
            cout<<"F"<<endl;
        }
    }
    
    return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:26:19: error: 'F' was not declared in this scope
   26 |         else if(m+F<30){
      |                   ^
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+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;
    else if(m==-1||f==-1) cout << "F" << endl;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(m==-1||f==-1) cout << "F" << endl;
      |     ^~~~
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+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;
    else if(m==-1||f==-1) cout << "F" << endl;
    cin >> m >> f >> r;
  }
}


Compiler output:
a.cc: In function 'int main()':
a.cc:15:5: error: 'else' without a previous 'if'
   15 |     else if(m==-1||f==-1) cout << "F" << endl;
      |     ^~~~
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;
    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;
    }
    else cout << "F" << endl;
    cin >> m >> f >> r;
  }
}


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

#include<iostream>
using namespace std;

void lank(int m,int f,int r){
    if(m==-1||f==-1){
        cout<<"F";
    }
    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(30>=m+f&&m+f<50){
            if(r>=50)cout<<"C";
        else cout<<"D";
    }
    else if(m+f<30)cout<<"F";
    
}

int main(){
    int m,f,r;
    cin>>m>>f>>r;
    if(m==-1&&f==-1&&r==-1)break;
    lank(m,f,r);
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:22:28: error: break statement not within loop or switch
   22 |     if(m==-1&&f==-1&&r==-1)break;
      |                            ^~~~~
Language: C++

#include<iostream>
using namespace std;

void lank(int m,int f,int r){
    if(m==-1||f==-1){
        cout<<"F";
    }
    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(30>=m+f&&m+f<50){
            if(r>=50)cout<<"C";
        else cout<<"D";
    }
    else if(m+f<30)cout<<"F";
    
}

int main(){
    int m,f,r;
   while(1){
    cin>>m>>f>>r;
    if(m==-1&&f==-1&&r==-1)break;
    lank(m,f,r)}
    return 0;
}




Compiler output:
a.cc: In function 'int main()':
a.cc:24:16: error: expected ';' before '}' token
   24 |     lank(m,f,r)}
      |                ^
      |                ;
Language: C++

#include<iostream>
using namespace std;
main(){
  int m,f,r,d=0,e=0;
  
  cin >> m >> f >> r ;
  d=m+f;

  if(m==-1 && f==-1 && r==-1){
    e=1;
  } 
  else if(m==-1 || f==-1 && e==0){
    cout <<"F\n";
  }
  else if(d>=80 &&e==0 ){
      cout<<"A\n";
    }
  else if(d>=65 && d<80 &&e==0){
      cout<<"B\n";
    }
  else if(d>=50 && d<65 && e==0){
      cout<<"C\n";
    }
  else if(d>=30 && d<50 && e==0){
      if(c>=50){
	cout<< "C\n";
      }
      cout<< "D\n";
    }
  else if(d<30){
 cout << "F\n";
  }
    

  
}

Compiler output:
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    3 | main(){
      | ^~~~
a.cc: In function 'int main()':
a.cc:25:10: error: 'c' was not declared in this scope
   25 |       if(c>=50){
      |          ^
Language: C++

#include<iostream>

using namespace std;

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

Compiler output:
a.cc: In function 'int main()':
a.cc:6:18: error: 'm' was not declared in this scope; did you mean 'tm'?
    6 |     while(cin >> m >> f >> r, m!=0||f!=0||r!=0) {
      |                  ^
      |                  tm
a.cc:6:23: error: 'f' was not declared in this scope
    6 |     while(cin >> m >> f >> r, m!=0||f!=0||r!=0) {
      |                       ^
a.cc:6:28: error: 'r' was not declared in this scope
    6 |     while(cin >> m >> f >> r, m!=0||f!=0||r!=0) {
      |                            ^
a.cc:9:42: error: expected ';' before ':' token
    9 |         else if (m + f >= 50) cout << 'C':
      |                                          ^
      |                                          ;