Syafi'i Blog's'

Senin, 04 Mei 2009

Ujian PBO v3

/**
* @(#)GajiPegawai3.java
*
*
* @author
* @version 1.00 2009/5/4
*/


import java.io.*;
public class GajiPegawai3 {

public static void main (String[] args) throws Exception
{
BufferedReader data = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Gaji pegawai");
System.out.println("==================================");
System.out.println("");

String nama;
System.out.print("Nama Pegawai :");
nama = data.readLine();

double gaji;
System.out.print("Gaji :");
gaji=Double.parseDouble(data.readLine());

double tunj= (gaji*12.5)/100;
System.out.println("Tunjangan :"+tunj);

double ta= (gaji*2)/100;
System.out.println("Tunjangan Anak :"+ta);

double ts= (gaji*5)/100;
System.out.println("Tunjangan Istri :"+ts);
System.out.println("==================================");

double pdt= gaji+tunj+ta+ts;
System.out.println("Pendapatan :"+pdt);
System.out.println("");

double pot;
System.out.print("Potongan :");
pot=Double.parseDouble(data.readLine());

double as= (gaji*7)/100;
System.out.println("Asuransi Kesehatan :"+as);
System.out.println("==================================");

double 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);
double tot= pdt+pgr;
System.out.println("Total Gaji:"+tot);

}


}

1 komentar:

Anonim mengatakan...

trimz dah diupload..
jd enak ngopinya, hehe... ^_^

Template by : auraipank x-template.blogspot.com