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);
}
}
Hasilnya:
Tidak ada komentar:
Posting Komentar