import java.io.*;
public class inputnilai{
public static void main (String[]args) throws IOException{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
System.out.print("masukan nilai ujian anda:");
String skor=input.readLine();
int skorUjian=Integer.parseInt(skor); char grade;
if(skorUjian>=90){
grade ='A';
} else if(skorUjian>=80){
grade ='B';
} else if(skorUjian>=70){
grade ='C';
} else {
grade ='D';
}
System.out.println ("grade = "+grade);
}
}
public class inputnilai{
public static void main (String[]args) throws IOException{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
System.out.print("masukan nilai ujian anda:");
String skor=input.readLine();
int skorUjian=Integer.parseInt(skor); char grade;
if(skorUjian>=90){
grade ='A';
} else if(skorUjian>=80){
grade ='B';
} else if(skorUjian>=70){
grade ='C';
} else {
grade ='D';
}
System.out.println ("grade = "+grade);
}
}
0 comments:
Posting Komentar