/**
* @(#)GajiPegawai2.java
*
*
* @author
* @version 1.00 2009/5/4
*/
import java.io.*;
public class GajiPegawai2 {
public static void main (String[] args) throws Exception
{
String nama;double tot;
double gaji;double pdt;
double tunj;double pot;
double ta;double as;
double ts;double pgr;
BufferedReader data = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Gaji pegawai");
System.out.println("==================================");
System.out.println("");
System.out.print("Nama Pegawai :");
nama = data.readLine();
System.out.print("Gaji :");
gaji=Double.parseDouble(data.readLine());
tunj= (gaji*12.5)/100;
System.out.println("Tunjangan :"+tunj);
ta= (gaji*2)/100;
System.out.println("Tunjangan Anak :"+ta);
ts= (gaji*5)/100;
System.out.println("Tunjangan Istri :"+ts);
System.out.println("==================================");
pdt= gaji+tunj+ta+ts;
System.out.println("Pendapatan :"+pdt);
System.out.println("");
System.out.print("Potongan :");
pot=Double.parseDouble(data.readLine());
as= (gaji*7)/100;
System.out.println("Asuransi Kesehatan :"+as);
System.out.println("==================================");
pgr= pot+as;
System.out.println("Pengurangan :"+pgr);
System.out.println("");
System.out.println("Jadi Gaji Pokok yang diterima ");
System.out.println("==================================");
System.out.println("Pendapatan :"+pdt);
System.out.println("Pengurangan :"+pgr);
tot= pdt+pgr;
System.out.println("Total Gaji:"+tot);
}
}
Senin, 04 Mei 2009
Ujian PBO v2
Diposting oleh Jouhari di 12:59:00 PM
Label: Arsip java (newbi)
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar