Posted by : San Kamis, 27 Desember 2012


import java.io.*;
public class LatihanUjianPraktikumAP1 {

    public static void main(String[] args) throws Exception{
        DataInputStream masuk = new DataInputStream(System.in);
       
        String strnilai = null;
        String matkul = null;
       
        try{
            System.out.print("Masukkan Mata Kuliah Anda : ");
            matkul = masuk.readLine();
            System.out.print("Masukkan Nilai Ujian Anda [0 - 100] :");
            strnilai = masuk.readLine();
            System.out.println();
        }catch(IOException e){}
       
        int nilai = Integer.parseInt(strnilai);
       
        if(nilai >=90 && nilai <=100){
        System.out.println("Nilai Mata Kuliah "+matkul+" Anda = A");
}
        else if(nilai >=80 && nilai <=89)
{
        System.out.println("Nilai Mata Kuliah "+matkul+" Anda = B");
}
        else if(nilai>=60 && nilai <=79)
        {
System.out.println("Nilai Mata Kuliah "+matkul+" Anda = C");
}
        else if(nilai >= 50 && nilai <=59)
        {
System.out.println("Nilai Mata Kuliah "+matkul+" Anda = D");
}      
else
{      
System.out.println("Nilai Mata Kuliah "+matkul+" Anda = E");
        }
   
    }
}




screenshot


{ 1 komentar... read them below or add one }

Popular Post

Blogger templates

Blog Archive

ReeCoder. Diberdayakan oleh Blogger.

Followers

Gunadarma Headline News

Me on Google+

- Copyright © Ree San -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -