lat7.java

import java.io.* ;
public class lat7{

public static void main(String Arg[]) throws IOException{
String str ; String NIP ; String Nama ;String jbt ;
double gaji=0 ; double pajak =0 ; double total=0 ;
int Kdj ;
BufferedReader Get=new BufferedReader(new
InputStreamReader(System.in)) ;

System.out.print(“NIP         : “)  ; NIP = Get.readLine() ;
System.out.print(“Nama     : “)  ; Nama = Get.readLine() ;
System.out.print(“Kode      : “)  ; str = Get.readLine() ;
Kdj = Integer.parseInt(str) ;

switch(Kdj) {
case 1 : jbt = “Direktur”  ; gaji = 5000000 ;
break ;
case 2 : jbt = “Wakil Direktur” ;gaji = 4000000;
break ;
case 3 : jbt = “Bendahara”  ; gaji = 3000000 ;
break ;
case 4 : jbt = “Staf”  ; gaji = 2000000 ;
break ;
default :
jbt = “”  ; gaji = 0 ;
}

pajak = 0.1 * gaji ;
total = gaji-pajak ;

System.out.println(“Jabatan   : ” + jbt )  ;
System.out.println(“Gaji      : ” + gaji)  ;
System.out.println(“Pajak     : ” + pajak )  ;
System.out.println(“Total     : ” + total )  ;
}

}

Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s