import java.util.Scanner;
class perhitungan_gaji_karyawan
{ //Andi Mahyudin
public static void main(String[]args)
{
int gajipokok = 0;
int bonus = 0;
int pajak = 0;
int total_gaji = 0;
int gajikotor = 0;
Scanner sc = new Scanner (System.in);
System.out.println("Golongan : 1 ");
System.out.println("(1). SMA = 1jt");
System.out.println("(2). S1 = 1,5jt");
System.out.println("(3). S2 = 2jt");
System.out.println("");
System.out.println("Golongan : 2 ");
System.out.println("(4). SMA = 1,5jt");
System.out.println("(5). S1 = 2,5jt");
System.out.println("(6). S2 = 3jt");
System.out.println("");
System.out.println("Pilih dan masukkan dari data salah satu diatas !");
System.out.print("Masukan Golongan Anda : ");
String golongan = sc.next();
System.out.print("Masukan Nomor Pendidikan : ");
int pendidikan = sc.nextInt ();
System.out.println("");
System.out.println("========================KETERANGAN========================");
if (pendidikan==1 )
{
gajipokok=1000000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = SMA");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==2)
{
gajipokok=1500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S1");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==3)
{
gajipokok=2000000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S2");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==4)
{
gajipokok=1500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = SMA");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==5)
{
gajipokok=2500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S1");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==6)
{
gajipokok=3500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S2");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
System.out.println("==========================================================");
}
}
Output :
class perhitungan_gaji_karyawan
{ //Andi Mahyudin
public static void main(String[]args)
{
int gajipokok = 0;
int bonus = 0;
int pajak = 0;
int total_gaji = 0;
int gajikotor = 0;
Scanner sc = new Scanner (System.in);
System.out.println("Golongan : 1 ");
System.out.println("(1). SMA = 1jt");
System.out.println("(2). S1 = 1,5jt");
System.out.println("(3). S2 = 2jt");
System.out.println("");
System.out.println("Golongan : 2 ");
System.out.println("(4). SMA = 1,5jt");
System.out.println("(5). S1 = 2,5jt");
System.out.println("(6). S2 = 3jt");
System.out.println("");
System.out.println("Pilih dan masukkan dari data salah satu diatas !");
System.out.print("Masukan Golongan Anda : ");
String golongan = sc.next();
System.out.print("Masukan Nomor Pendidikan : ");
int pendidikan = sc.nextInt ();
System.out.println("");
System.out.println("========================KETERANGAN========================");
if (pendidikan==1 )
{
gajipokok=1000000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = SMA");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==2)
{
gajipokok=1500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S1");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==3)
{
gajipokok=2000000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S2");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==4)
{
gajipokok=1500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = SMA");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==5)
{
gajipokok=2500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S1");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
else if (pendidikan==6)
{
gajipokok=3500000;
bonus=gajipokok*10/100;
gajikotor=gajipokok+bonus;
pajak=gajikotor*5/100;
total_gaji=gajipokok+bonus-pajak;
System.out.println("Golongan = " + golongan);
System.out.println("Nomor Pilihan Pendidikan Anda = " + pendidikan);
System.out.println("Nama Pendidikan = S2");
System.out.println("Gaji Pokok = Rp. " + gajipokok);
System.out.println("Bonus = Rp. " + bonus);
System.out.println("Pajak = Rp. " + pajak);
System.out.println("Total Gaji yang Diterima = Rp. " + total_gaji);
}
System.out.println("==========================================================");
}
}
Output :
No comments:
Post a Comment