criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.util.Scanner;

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

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

public class Main {
	public static void main(String[] args) {
		printAnswer();
	}

	private static void printAnswer() {
		Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);

		try {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String dataset = br.readLine();

			while (dataset != null) {
				String[] grades = dataset.split(" ", 0);
				int middleResult = Integer.parseInt(grades[0]);
				int termendResult = Integer.parseInt(grades[1]);
				int makeupResult = Integer.parseInt(grades[2]);

				if (middleResult == -1 || termendResult == -1) {
					System.out.println("F");
				} else if (middleResult + termendResult >= 80) {
					System.out.println("A");
				} else if (middleResult + termendResult >= 65) {
					System.out.println("B");
				} else if (middleResult + termendResult >= 50) {
					System.out.println("C");
				} else if (middleResult + termendResult >= 30) {
					if (makeupResult >= 50) {
						System.out.println("C");
					} else {
						System.out.println("D");
					}
				} else {
					System.out.println("F");
				}
				dataset = br.readLine();
			}

		} catch (IOException e) {
			logger.info("Error:  Reading input data is failed.");
		}
	}
}

Compiler output:
Main.java:7: error: cannot find symbol
		Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
		^
  symbol:   class Logger
  location: class Main
Main.java:7: error: cannot find symbol
		Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
		                                 ^
  symbol:   variable Logger
  location: class Main
Main.java:7: error: cannot find symbol
		Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
		                ^
  symbol:   variable Logger
  location: class Main
Main.java:10: error: cannot find symbol
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			                        ^
  symbol:   class BufferedReader
  location: class Main
Main.java:10: error: cannot find symbol
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			                                           ^
  symbol:   class InputStreamReader
  location: class Main
Main.java:39: error: cannot find symbol
		} catch (IOException e) {
		         ^
  symbol:   class IOException
  location: class Main
7 errors
Language: Java

import java.util.Scanner;

public class grading{
	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){
				m = 0;
			}
			if(f == -1){
				f = 0;
			}
			int sum = m+f;
			if(sum >= 80){
				System.out.println("A");
			}else if(sum >= 65 && sum < 80){
				System.out.println("B");
			}else if(sum >= 50 && sum < 65){
				System.out.println("C");
			}else if(sum >= 30 && sum < 50){
				if(r >= 50){
					System.out.println("C");
				}else{
					System.out.println("D");
				}
			}else{
				System.out.println("F");
			}
		}
	}
}

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

import java.util.*;
public class Seiseki{
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;
	else if (m == -1){
	System.out.println("F");
	}
	else if (f == -1){
	System.out.println("F");}
	else if (m+f>=80){
	System.out.println("A");}
	else if (m+f>=65){
	System.out.println("B");}
	else if (m+f>=50){
	System.out.println("C");}
	else if (m+f>=30){
		if(r>=50){
		System.out.println("C");
		}
		else{
	System.out.println("D");}
	}else {
	System.out.println("F");}
}}
}

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

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

    while(true){
      int m = sc.nextInt();
      int f = sc.nextInt();
      int r = sc.nextInt();
      if(m==-1 && f==-1 && r==-1)break;

      if(m==-1 || f==-1 || m+f<30)System.out.printf("F\n");
      else if(80<m+f)System.out.printf("A\n");
      else if(65<m+f<80)System.out.printf("B\n");
      else if(50<m+f<65)System.out.printf("C\n");
      else if(30<m+f<50 && 50<r)System.out.printf("C\n");
      else if(30<m+f<50)System.out.printf("D\n");
      //else if(50<r)System.out.printf("C\n");

    }
  }
}

Compiler output:
Main.java:14: error: bad operand types for binary operator '<'
      else if(65<m+f<80)System.out.printf("B\n");
                    ^
  first type:  boolean
  second type: int
Main.java:15: error: bad operand types for binary operator '<'
      else if(50<m+f<65)System.out.printf("C\n");
                    ^
  first type:  boolean
  second type: int
Main.java:16: error: bad operand types for binary operator '<'
      else if(30<m+f<50 && 50<r)System.out.printf("C\n");
                    ^
  first type:  boolean
  second type: int
Main.java:17: error: bad operand types for binary operator '<'
      else if(30<m+f<50)System.out.printf("D\n");
                    ^
  first type:  boolean
  second type: int
4 errors
Language: Java

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

    while(true){
      int m = sc.nextInt();
      int f = sc.nextInt();
      int r = sc.nextInt();
      if(m==-1 && f==-1 && r==-1)break;

      if(m==-1 || f==-1 || m+f<=29)System.out.printf("F\n");
      else if(80<=m+f)System.out.printf("A\n");
      else if(65<=m+f<=79)System.out.printf("B\n");
      else if(50<=m+f<=64)System.out.printf("C\n");
      else if(30<=m+f<=49 && 50<=r)System.out.printf("C\n");
      else {System.out.printf("D\n");
      }

    }
  }
}

Compiler output:
Main.java:14: error: bad operand types for binary operator '<='
      else if(65<=m+f<=79)System.out.printf("B\n");
                     ^
  first type:  boolean
  second type: int
Main.java:15: error: bad operand types for binary operator '<='
      else if(50<=m+f<=64)System.out.printf("C\n");
                     ^
  first type:  boolean
  second type: int
Main.java:16: error: bad operand types for binary operator '<='
      else if(30<=m+f<=49 && 50<=r)System.out.printf("C\n");
                     ^
  first type:  boolean
  second type: int
3 errors
Language: Java

import java.util.Scanner;

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

Compiler output:
Main.java:12: error: incomparable types: boolean and int
			else if(m == f  == r == -1) break;
			                ^
Main.java:12: error: incomparable types: boolean and int
			else if(m == f  == r == -1) break;
			                     ^
2 errors
Language: Java

import java.util.ArrayList;
import java.util.Scanner;

public class kadai6 {
public static void main(String[] args){
	Scanner sc;
	ArrayList<Character> ar = new ArrayList<Character>();
	int n1=0,n2=0,n3=0;
	sc = new Scanner(System.in);
	while(n1!=-1&&n2!=-1&&n3!=-1){
		n1 = sc.nextInt();
		n2 = sc.nextInt();
		n3 = sc.nextInt();
	    if(n1==-1||n2==-1){
			ar.add('F');
		}
	    else if(n1+n2>=80){
			ar.add('A');
		}
		else if(n1+n2>=65){
			ar.add('B');
		}
		else if(n1+n2>=50){
			ar.add('C');
		}
		else if(n1+n2>=30){
			if(n3>=50){
				ar.add('C');
			}
			else{
				ar.add('D');
			}
		}
		else if(n1+n2<30){
			ar.add('F');
		}
		
	}
	for(int n=0;n<ar.size();n++){
		System.out.println(ar.get(n));
	}
	
}
}

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

import java.util.Scanner;

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

Compiler output:
Main.java:33: error: ')' expected
      else ((m == -1 || e == -1){
                                ^
Main.java:33: error: not a statement
      else ((m == -1 || e == -1){
           ^
2 errors
Language: Java

import java.util.Scanner;

public class Grading{
    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.printf("F\n");
	else{
	    if(m+f>=80) System.out.printf("A\n");
	    else if(m+f>=65) System.out.printf("B\n");
	    else if(m+f>=50)System.out.printf("C\n");
	    else if(m+f>=30){
                if(r>=50) System.out.printf("C\n");
		else System.out.printf("D\n");
	    }
	    else System.out.printf("F\n");
	}
	
    }
  }
 }

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

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

	Scanner sc = new Scanner(System.in);

	int m = sc.nextInt();

	int f = sc.nextInt();

	int r = sc.nextInt();

	int t = m+l

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

		}else{
			System.out.println("F");
		}

		}
	}

Compiler output:
Main.java:15: error: ';' expected
	int t = m+l
	           ^
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

	Scanner sc = new Scanner(System.in);

	int m = sc.nextInt();

	int f = sc.nextInt();

	int r = sc.nextInt();

	int t = m+l;

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

		}else{
			System.out.println("F");
		}

		}
	}

Compiler output:
Main.java:15: error: cannot find symbol
	int t = m+l;
	          ^
  symbol:   variable l
  location: class Main
1 error
Language: Java

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

	Scanner sc = new Scanner(System.in);

for(;;){

	int m = sc.nextInt();

	int f = sc.nextInt();

	int r = sc.nextInt();

	int t = m+f;
if(m==-1 && f==-1 && r==-1) break;

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

		}else{
			System.out.println("F");
		}

		}
	}

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

mport 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();
		int k=m+f;

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

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

import java.util.Scanner;

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

Compiler output:
Main.java:3: error: class, interface, enum, or record expected
public Main {
       ^
Main.java:4: error: unnamed classes are a preview feature and are disabled by default.
	public static void main(String[] args) {
	              ^
  (use --enable-preview to enable unnamed classes)
Main.java:29: error: class, interface, enum, or record expected
}
^
3 errors
Language: Java

import java.util.Scanner;

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

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

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
  
public class Main {
  private static String marks = "SHCD";
  
  public static void main(String args[] ) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true) {
      String scores = br.readLine();
      if (line.equals("-1 -1 -1") {
        return;
      }

      grade(scores);
    }
  }

  private static void grade(String scores) {
    int middle = Integer.parseInt(scores.split()[0]);
    int last = Integer.parseInt(scores.split()[1]);
    int retry = Integer.parseInt(scores.split()[2]);

    //??????????¨??????????????¨????????????????????¬????????????´???????????? F???
    if (middle == -1 || last == -1) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 80 ??\???????????°????????? A ???
    } else if (middle + last >= 80) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 65 ??\??? 80 ??????????????°????????? B???
    } else if (middle + last >= 65) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 50 ??\??? 65 ??????????????°????????? C???
    } else if (middle + last >= 50) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??\??? 50 ??????????????°????????? D??? ???????????????????¨?????????°??? 50 ??\???????????°????????? C???
    } else if (middle + last >= 30) {
      if (retry >= 50) {
        System.out.println("C");
      } else {
        System.out.println("F");
      }
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??????????????°????????? F???
    } else if (middle + last < 30) {
      System.out.println("F");
    }
  }
}

Compiler output:
Main.java:13: error: ')' expected
      if (line.equals("-1 -1 -1") {
                                 ^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
  
public class Main {
  private static String marks = "SHCD";
  
  public static void main(String args[] ) throws Exception {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    while (true) {
      String scores = br.readLine();
      if (scores.equals("-1 -1 -1") {
        return;
      }

      grade(scores);
    }
  }

  private static void grade(String scores) {
    int middle = Integer.parseInt(scores.split()[0]);
    int last = Integer.parseInt(scores.split()[1]);
    int retry = Integer.parseInt(scores.split()[2]);

    //??????????¨??????????????¨????????????????????¬????????????´???????????? F???
    if (middle == -1 || last == -1) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 80 ??\???????????°????????? A ???
    } else if (middle + last >= 80) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 65 ??\??? 80 ??????????????°????????? B???
    } else if (middle + last >= 65) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 50 ??\??? 65 ??????????????°????????? C???
    } else if (middle + last >= 50) {
      System.out.println("F");
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??\??? 50 ??????????????°????????? D??? ???????????????????¨?????????°??? 50 ??\???????????°????????? C???
    } else if (middle + last >= 30) {
      if (retry >= 50) {
        System.out.println("C");
      } else {
        System.out.println("F");
      }
    //??????????¨???¨??????????¨????????¨??????°??? 30 ??????????????°????????? F???
    } else if (middle + last < 30) {
      System.out.println("F");
    }
  }
}

Compiler output:
Main.java:13: error: ')' expected
      if (scores.equals("-1 -1 -1") {
                                   ^
1 error
Language: Java

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int m, f, r;
        while (true) {
            m = sc.nextInt();
            f = sc.nextInt();
            r = sc.nextInt();

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

        }
    }

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

import java.util.Scanner;

public class Grad{
 public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
  int[] m =new int[10000];
  int[] f =new int[10000];
  int[] r =new int[10000];
  String[] grade =new String[10000];
   
  int i=0; 

 /*Use do-while because 1st data-set must scan*/
 do {
    m[i]=sc.nextInt();
    f[i]=sc.nextInt();
    r[i]=sc.nextInt();
    i++;
  }while(m[i-1]!=-1||f[i-1]!=-1||r[i-1]!=-1); 
                         //Repeat until the last score(m,f,r)=(0,0,0)

  /*Grading each of the students & output their grade*/
  for(int j=0;j<i;j++){
    if(m[j]+f[j]>=80)
     grade[j]="A";
    else if(m[j]+f[j]>=65)
     grade[j]="B";
    else if(m[j]+f[j]>=50)
     grade[j]="C";
    else if(m[j]+f[j]>=30){
     if(r[j]>=50)
      grade[j]="C";
     else
      grade[j]="D";
    }
    else
     grade[j]="F";

     System.out.println(grade[j]);
  }
     
 }
}

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

import java.util.Scanner;

public class Grad{
 public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
  int[] m =new int[10000];
  int[] f =new int[10000];
  int[] r =new int[10000];
  String[] grade =new String[10000];
   
  int i=0; 

 /*Use do-while because 1st data-set must scan*/
 do {
    m[i]=sc.nextInt();
    f[i]=sc.nextInt();
    r[i]=sc.nextInt();
    i++;
  }while(m[i-1]!=-1||f[i-1]!=-1||r[i-1]!=-1); 
                         //Repeat until the last score(m,f,r)=(0,0,0)

  /*Grading each of the students & output their grade*/
  for(int j=0;j<i;j++){
    if(m[j]=-1||f[j]=-1)
     grade[j]="F";
    else{
     if(m[j]+f[j]>=80)
      grade[j]="A";
     else if(m[j]+f[j]>=65)
      grade[j]="B";
     else if(m[j]+f[j]>=50)
      grade[j]="C";
     else if(m[j]+f[j]>=30){
      if(r[j]>=50)
       grade[j]="C";
      else
       grade[j]="D";
     }
     else
      grade[j]="F";
   }
     System.out.println(grade[j]);
  }
     

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

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
  int[] m =new int[10000];
  int[] f =new int[10000];
  int[] r =new int[10000];
  String[] grade =new String[10000];
   
  int i=0; 

 /*Use do-while because 1st data-set must scan*/
 do {
    m[i]=sc.nextInt();
    f[i]=sc.nextInt();
    r[i]=sc.nextInt();
    i++;
  }while(m[i-1]!=-1||f[i-1]!=-1||r[i-1]!=-1); 
                         //Repeat until the last score(m,f,r)=(0,0,0)

  /*Grading each of the students & output their grade*/
  for(int j=0;j<i;j++){
    if(m[j]=-1||f[j]=-1)
     grade[j]="F";
    else{
     if(m[j]+f[j]>=80)
      grade[j]="A";
     else if(m[j]+f[j]>=65)
      grade[j]="B";
     else if(m[j]+f[j]>=50)
      grade[j]="C";
     else if(m[j]+f[j]>=30){
      if(r[j]>=50)
       grade[j]="C";
      else
       grade[j]="D";
     }
     else
      grade[j]="F";
   }
     System.out.println(grade[j]);
  }
     

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

import java.util.Scanner;

public class Main{
 public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
  int[] m =new int[10000];
  int[] f =new int[10000];
  int[] r =new int[10000];
  String[] grade =new String[10000];
   
  int i=0; 

 /*Use do-while because 1st data-set must scan*/
 do {
    m[i]=sc.nextInt();
    f[i]=sc.nextInt();
    r[i]=sc.nextInt();
    i++;
  }while(m[i-1]!=-1||f[i-1]!=-1||r[i-1]!=-1); 
                         //Repeat until the last score(m,f,r)=(0,0,0)

  /*Grading each of the students & output their grade*/
  for(int j=0;j<i;j++){
    if(m[j]=-1||f[j]=-1)
     grade[j]="F";
    else{
     if(m[j]+f[j]>=80)
      grade[j]="A";
     else if(m[j]+f[j]>=65)
      grade[j]="B";
     else if(m[j]+f[j]>=50)
      grade[j]="C";
     else if(m[j]+f[j]>=30){
      if(r[j]>=50)
       grade[j]="C";
      else
       grade[j]="D";
     }
     else
      grade[j]="F";
   }
     System.out.println(grade[j]);
  }
 }
}

Compiler output:
Main.java:25: error: bad operand types for binary operator '||'
    if(m[j]=-1||f[j]=-1)
              ^
  first type:  int
  second type: int
Main.java:25: error: incompatible types: int cannot be converted to boolean
    if(m[j]=-1||f[j]=-1)
           ^
2 errors
Language: Java

import java.util.Scanner;

public class Grad{
 public static void main(String[] args){
  
  Scanner sc= new Scanner(System.in);
  int[] m =new int[10000];
  int[] f =new int[10000];
  int[] r =new int[10000];
  String[] grade =new String[10000];
   
  int i=0; 

 /*Use do-while because 1st data-set must scan*/
 do {
    m[i]=sc.nextInt();
    f[i]=sc.nextInt();
    r[i]=sc.nextInt();
    i++;
  }while(m[i-1]!=-1||f[i-1]!=-1||r[i-1]!=-1); 
                         //Repeat until the last score(m,f,r)=(0,0,0)

  /*Grading each of the students & output their grade*/
  for(int j=0;j<i-1;j++){
    if(m[j]==-1||f[j]==-1)
     grade[j]="F";
    else{
     if(m[j]+f[j]>=80)
      grade[j]="A";
     else if(m[j]+f[j]>=65)
      grade[j]="B";
     else if(m[j]+f[j]>=50)
      grade[j]="C";
     else if(m[j]+f[j]>=30){
      if(r[j]>=50)
       grade[j]="C";
      else
       grade[j]="D";
     }
     else
      grade[j]="F";
   }
     System.out.println(grade[j]);
  }
     
 }
}

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

import java.util.Scanner;
import java.util.ArrayList;

public class Main {
	public static void main(String args[]){
		Scanner in=new Scanner(System.in);
		ArrayList<Integer> set=new ArrayList<Integer>();
		ArrayList<Integer> result=new ArrayList<Integer>();
		int a=1;
		int b=1;
		int c=1;
		String grade="FDCBA";
		while (!(a==-1 && b==-1 && c==-1)){
			a=in.nextInt();
			b=in.nextInt();
			c=in.nextInt();
			set.add(a);
			set.add(b);
			set.add(c);
		}
		for(int k=0;k<(set.size()-3);k+=3){
			a=set.get(k);
			b=set.get(k+1);
			c=set.get(k+2);
			if (a==-1 ||b==-1){
				result.add(0);
			}else if ((a+b)>=80) {
				result.add(4);
			}else if ((a+b)>=65) {
				result.add(3);
			}else if ((a+b)>=50) {
				result.add(2);
			}else if ((a+b)>=30) {
				if (c >= 50) {
					result.add(2)
				}
				result.add(1);
			}else{
				result.add(0);
			}
		}

		for (int i=0;i<result.size();i++) {
			System.out.println("%c",grade.charAt(result.get(i)))
		}

	}
}

Compiler output:
Main.java:35: error: ';' expected
					result.add(2)
					             ^
Main.java:44: error: ';' expected
			System.out.println("%c",grade.charAt(result.get(i)))
			                                                    ^
2 errors
Language: Java

public class Main {
	private static Scanner sc;

	public static void main(String[] args) {
		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.printf("F");
			} else if (m + f >= 80) {
				System.out.printf("A");
			} else if (m + f >= 65) {
				System.out.printf("B");
			} else if (m + f >= 50) {
				System.out.printf("C");
			} else if (m + f >= 30) {
				if (r >= 50) {
					System.out.printf("C");
				}
				System.out.printf("D");
			} else {
				System.out.printf("F");
			}

		}
		System.out.printf("\n");

	}

}

Compiler output:
Main.java:2: error: cannot find symbol
	private static Scanner sc;
	               ^
  symbol:   class Scanner
  location: class Main
Main.java:5: error: cannot find symbol
		sc = new Scanner(System.in);
		         ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

import java.util.Scanner;

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

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

import java.util.Scanner;

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

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

import java.util.Scanner;

public class lesson2_1 {
	public static void main(String[] args) {
		int i = 0, j = 0, m = 0, x, y;
		Scanner sc = new Scanner(System.in);
		do {

			i = sc.nextInt();
			j = sc.nextInt();
			m = sc.nextInt();

			if (i <= 50 && j <= 50 && m <= 100)
				if ((i + j) >= 80)
					System.out.println("A");
				else if ((i + j) < 80 && (i + j) >= 65)
					System.out.println("B");
				else if ((i + j) >= 50 && (i + j) < 65)
					System.out.println("C");
				else if ((i + j) >= 30 && (i + j) < 50) {
					if (m >= 50)
						System.out.println("C");
					else
						System.out.println("D");
				} else if ((i + j) <= 30)
					System.out.println("F");
		} while (i != 0 && j != 0 && m != 0);
	}
}

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

import java.util.Scanner;

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

			} else {
				System.out.println("F");
			}
		}

	}

}

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

import java.util.ArrayList;
import java.util.Scanner;


public class Main {
	private static final int NOT_COME_EXAM = -1;
	
	private Scanner sc;
	private ArrayList<String> result;
	
	public Main(){
		sc = new Scanner(System.in);
		result = new ArrayList<String>();
	}
	
	public static void main(String[] args) {
		Main grading = new Grading();
		grading.getAllGrades();
		grading.printAllGrades();
	}
	
	private String grading(int m, int f, int r){
		int sum = m + f;
		if( m == NOT_COME_EXAM || f == NOT_COME_EXAM){
			return "F";
		}
		else if(sum >= 80){
			return "A";
		}
		else if(sum >= 65){
			return "B";
		}
		else if(sum >= 50){
			return "C";
		}
		else if(sum >= 30){
			if(r >= 50){
				return "C";
			}
			else{
				return "D";
			}
		}
		else if(sum < 30){
			return "F";
		}
		return "F";
	}
	
	private void getGrade(int m, int f, int r){		
		result.add(grading(m, f, r));
	}
	
	private void getAllGrades(){
		int m = -1;
		int f = -1;
		int r = -1;
		
		while(sc.hasNextLine()){
			m = sc.nextInt();
			f = sc.nextInt();
			r = sc.nextInt();
			if((m == -1) && (f == -1) && (r == -1)){
				break;
			}
			else{
				getGrade(m, f, r);
			}
		}
	}
	
	private void printAllGrades(){
		for(int i = 0; i < result.size(); i++){
			System.out.println(result.get(i));
		}
	}
}

Compiler output:
Main.java:17: error: cannot find symbol
		Main grading = new Grading();
		                   ^
  symbol:   class Grading
  location: class Main
1 error
Language: Java

import java.util.Scanner;
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) {
        if (f == -1 && r == -1) {
          break;
        }
        else;
          System.out.println("F");
        }
      else (m == -1) {
        System.out.println("F");
      }
      else {
        if (m + f >= 80) {
          System.out.println("A");
        }
        else if (m + f >= 65) {
          System.out.println("B");
        }
        else if (m + f >= 50) {
          System.out.println("C");
        }
        else if (m + f >= 30) {
          if (r >= 50) {
            System.out.println("C");
          }
          else {
            System.out.println("D");
          }
        }
        else {
          System.out.println("F");
        }
      }
    }
  }
}

Compiler output:
Main.java:6: error: ';' expected
      int m = sc.nextInt()
                          ^
Main.java:7: error: ';' expected
      int f = sc.nextInt()
                          ^
Main.java:8: error: ';' expected
      int r = sc.nextInt()
                          ^
Main.java:16: error: not a statement
      else (m == -1) {
           ^
Main.java:16: error: ';' expected
      else (m == -1) {
                    ^
Main.java:19: error: 'else' without 'if'
      else {
      ^
6 errors
Language: Java

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

Compiler output:
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:3: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

public class Main {


	public static void main(String[] args) {

		int m,f,r;

		Scanner sc = new Scanner(System.in);

	while(true){

		m = sc.nextInt();
		f = sc.nextInt();
		r = sc.nextInt();

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

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

			System.out.println("D");


		}

	}

	}

}

Compiler output:
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		^
  symbol:   class Scanner
  location: class Main
Main.java:8: error: cannot find symbol
		Scanner sc = new Scanner(System.in);
		                 ^
  symbol:   class Scanner
  location: class Main
2 errors
Language: Java

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

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

import java.util.*;
public class No10016 {
	public static void main(String[] args) {
		Scanner sc= new Scanner(System.in);
		char rank;
		for(;;){
			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){
				rank ='F';
			}
			else if(m+f >= 80){
				rank ='A';
			}
			else if(m+f >= 65){
				rank ='B';
			}
			else if(m+f >= 50){
				rank ='C';
			}
			else if(m+f >= 30){
				if(r >= 50){
					rank ='C';
				}
				else{
				rank ='D';
				}
			}
			else{
				rank ='F';
			}
			System.out.println(rank);
		}
	}

}

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

import java.util.Scanner;

public class AOJ10016 {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int m,f,r;
		while(true){
			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");
			}
		}
		
	}

}

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

#include <stdio.h>

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

Compiler output:
main.c: In function 'main':
main.c:8:46: error: expected ';' before 'if'
    8 |                 scanf("%d %d %d", &m, &f, &r)
      |                                              ^
      |                                              ;
    9 |                 if ( m == -1 && f == -1 && r == -1)break;
      |                 ~~
Language: C

#include<stdio.h>
    int main(void){
    double m,f,r;
    m<=50;
    f<=50;
    r<=100;
    while(1){
    sacnf("%l%l%l",&m,&f,&r);
    if(m==-1 && f==-1 && r==-1)break;
    else if(m+r+f>80){
    printf("A\n");
    }
    else if(m+f+r<80 && m+f+r>65){
    printf("B\n");
    }
    else if(m+f+r<65 && m+f+r>50){
    printf("C\n");
    }
    else if(m+f+r<50 && m+f+r>30){
    printf("D\n");
    }
    else if(m+f+r<50 && m+f+r>30 && r>=50){
    printf("C\n");
    }
    else if(m+f+r<30){
    printf("F\n");
    }


}
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:8:5: error: implicit declaration of function 'sacnf'; did you mean 'scanf'? [-Wimplicit-function-declaration]
    8 |     sacnf("%l%l%l",&m,&f,&r);
      |     ^~~~~
      |     scanf
Language: C

#include <stdio.h>

int main(void)
{
    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 == 0) {
            printf("F");
        } else if (m + f >= 80) {
            printf("A");
        } else if (m + f >= 65) {
            printf("B");
        } else if (m + f >= 50) {
            printf("C");
        } else if (m + f >= 30 && r >= 50) {
            printf("C");
        } else if (m + f >= 30 && r < 50) {
            printf("D");
        } else {
            printf("F");
        }
    )
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:5:12: error: 'true' undeclared (first use in this function)
    5 |     while (true) {
      |            ^~~~
main.c:2:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>'
    1 | #include <stdio.h>
  +++ |+#include <stdbool.h>
    2 | 
main.c:5:12: note: each undeclared identifier is reported only once for each function it appears in
    5 |     while (true) {
      |            ^~~~
main.c:26:5: error: expected statement before ')' token
   26 |     )
      |     ^
main.c:28:1: error: expected declaration or statement at end of input
   28 | }
      | ^
Language: C

#include <stdio.h>
#include <stdbool.h>
 
int main(void)
{   
    int med, fin, ret???sum;   
    while (true) {
    scanf ("%d%d%d", &med, &fin, &ret);
    if (med == -1 && fin == -1 && ret == -1) {
        break;
    }
    sum = med + fin;
    if (med == -1 || fin == -1) {
        printf ("F\n");
    } else if (sum >= 80){
        printf ("A\n");
    } else if (sum >= 65){
        printf ("B\n");
    } else if (sum >= 50 || (ret >= 50 && sum >= 30)){
        printf ("C\n");
    } else if (sum >= 30){
        printf ("D\n");
    } else {
        printf ("F\n");
    }
    }
    return 0;        
}

Compiler output:
main.c: In function 'main':
main.c:6:22: error: expected '=', ',', ';', 'asm' or '__attribute__' before '?' token
    6 |     int med, fin, ret???sum;
      |                      ^
main.c:8:35: error: 'ret' undeclared (first use in this function)
    8 |     scanf ("%d%d%d", &med, &fin, &ret);
      |                                   ^~~
main.c:8:35: note: each undeclared identifier is reported only once for each function it appears in
main.c:12:5: error: 'sum' undeclared (first use in this function)
   12 |     sum = med + fin;
      |     ^~~
Language: C

#include<stdio.h>
int main()
{
  int a[1000],m,f,r,r[1000],i,n;

  for(i=1;;i++)
    {
      scanf("%d %d %d",&m,&f,&r);
      if(m==-1&&f==-1&&r==-1)
        {
          break;
        }
      if(m!=-1&&f!=0)
        {
          a[i] = m + f;
        }
      else
        {
          a[i] =0;
        }
      n=i;
      r[i]==r;
    }

  for(i=1;i<=n;i++)
    {
      if(a[i]>=80)
        {
          printf("A\n");
        }

      if(a[i]<80&&a[i]>=65)
        {
          printf("B\n");
        }

      if(a[i]<65&&a[i]>=50)
        {
          printf("C\n");
        }
      if(a[i]<50&&a[i]>=30)
        {
          if(r[i]>=50)
            {
              printf("C\n");
  else
            {
              printf("D\n");
            }
        }

      if(a[i]<30)
        {
          printf("F\n");
        }
    }

  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:4:21: error: conflicting types for 'r'; have 'int[1000]'
    4 |   int a[1000],m,f,r,r[1000],i,n;
      |                     ^
main.c:4:19: note: previous declaration of 'r' with type 'int'
    4 |   int a[1000],m,f,r,r[1000],i,n;
      |                   ^
main.c:46:3: error: expected '}' before 'else'
   46 |   else
      |   ^~~~
Language: C

#include <stdio.h>
int m,f,r;
int main(){
  for(;~scanf("%d%d%d",&m,&f,&r)&&m!=-1&&f!=-1;){
    if ((m==-1)||(f==-1)) printf("F\n");
    else {
    m+=f;
    //        printf("%c\n",m>79?'A':m>64?'B':m>49?'C':((m>29)&&(r>49))?'C':m>2\
9?'D':'F');
    else if (m>79) printf("A\n");
    else if (m>64) printf("B\n");
    else if (m>49) printf("C\n");
    else if (m>29) {
      if (r>49) printf("C\n");
      else      printf("D\n");
    }
    else           printf("F\n");
    }
  }
  return 0;
}

Compiler output:
main.c: In function 'main':
main.c:10:5: error: 'else' without a previous 'if'
   10 |     else if (m>79) printf("A\n");
      |     ^~~~
Language: C

#include <stdio.h>

int main (int argc, const char * argv[]) {
    int m,f,r,sum;
	
	while(1){
		scanf("%d %d %d",&m,&f,&r);
		if(m==-1&&f==-1&&r==-1)break;
		
		sum=m+f;
		
		if(m==-1&&f==-1)printf("F\n")
		
		if(sum>=80){
			printf("A\n");
		}else if(80>sum&&sum>=65){
			printf("B\n");
		}else if(65>sum&&sum>=50||r>=50){
			printf("C\n");
		}else if(50>sum&&sum>=30){
			printf("D\n");
		}else if(sum<30){
			printf("F\n");
		}
	}
		
	
    return 0;
}

Compiler output:
main.c: In function 'main':
main.c:12:46: error: expected ';' before 'if'
   12 |                 if(m==-1&&f==-1)printf("F\n")
      |                                              ^
      |                                              ;
   13 | 
   14 |                 if(sum>=80){
      |                 ~~
Language: C

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

Compiler output:
main.c: In function 'main':
main.c:18:37: error: expected ')' before numeric constant
   18 |         } else if (30<=sum && sum<50 50<=r){
      |                   ~                 ^~~
      |                                     )
main.c:20:37: error: expected ')' before 'r'
   20 |         } else if (30<=sum && sum<50 r<50){
      |                   ~                 ^~
      |                                     )