import java.io.* ;
class latbaru{
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 pil, Kdj ;
BufferedReader Get=new BufferedReader(new InputStreamReader(System.in)) ;
do{
System.out.println("Menu Utama");
System.out.println("1. Mengitung Gaji Pegawai");
System.out.println("2. Anda Mau Keluar");
System.out.print("Masukkan Pilihan Yang Anda Sukai…!!! : "); str = Get.readLine() ;
pil= Integer.parseInt(str) ;
switch(pil){
case 1:
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) ;
if (Kdj==1) {
jbt = "Direktur" ; gaji = 5000000 ;
} elseif (Kdj==2) {
jbt = "Wakil Direktur" ; gaji = 4000000 ;
} elseif (Kdj==3) {
jbt = "Bendahara" ; gaji = 3000000 ;
} elseif (Kdj==4) {
jbt = "Staf" ; gaji = 2000000 ;
} else {
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 ) ;
break ;
}
System.out.print("Copyright@Syahrul Ramadhan"); str = Get.readLine() ;
}while(pil != 2);
}
}
0 komentar:
Posting Komentar