문제
풀이
import java.io.*;
import java.util.*;
import java.text.DecimalFormat;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
double kor = sc.nextInt();
double eng = sc.nextInt();
double math = sc.nextInt();
double avg = (kor+eng+math)/3.0;
DecimalFormat df = new DecimalFormat("0.00");
String str = df.format(avg);
System.out.print(str+" ");
if(avg >= 90) {
System.out.print("A");
} else if(avg >= 80) {
System.out.print("B");
} else if(avg >= 70) {
System.out.print("C");
} else if(avg >= 60) {
System.out.print("D");
} else {
System.out.print("F");
}
}
}