program mencari jumlah sks mahasiswa dengan java



import java.util.Scanner;
public class ipk
{
 public static void main(String [] args)
 {
 Scanner wew = new Scanner (System.in);
 System.out.print("Berapa IP anda ? ");
 String ipk = wew.nextLine();
 double ip = Double.parseDouble (ipk);
 if ( ip < 1.50)
  {System.out.println("Anda hanya mendapat 12 SKS");}
 else
 if ( ip < 2)
  {System.out.println("Anda hanya mendapat 15 SKS");}
 else
 if ( ip < 2.50)
  {System.out.println("Anda hanya mendapat 18 SKS");}
 else
 if ( ip < 3.00)
  {System.out.println("Anda hanya mendapat 21 SKS");}
 else
 if (( ip == 3) | ( ip <= 4))
  {System.out.println("Anda hanya mendapat 24 SKS");}
 else
 if ( ip > 4.00)
  {System.out.println("Dosen anda salah kasih nilai.. Silahkan protes :v");}
 }
}



Post a Comment

0 Comments