- program
package hasil_angka;
/**
*
* @author YUDHA
*/
public class LATIHAN {
*/
public static void main(String[] args) {
double nilai;
nilai = 71;
if (nilai >= 0 && nilai <=40) {
System.out.println("E");
}
else if (nilai >= 41 && nilai <=50) {
System.out.println("D");
}
else if (nilai >= 51 && nilai <=60) {
System.out.println("C");
}
else if (nilai >= 61 && nilai <=70) {
System.out.println("B");
}
else if (nilai >= 71 && nilai <=80) {
System.out.println("A");
}
else if (nilai >= 81 && nilai <=100) {
System.out.println("input salah");
}{
}
{
}
}
}
Tidak ada komentar:
Posting Komentar