Jawaban Quiz Online
cara menghitung kasus pembayaran gaji pegawai
#include "iostream.h"
#include "conio.h"
void main(){
int i,nik[15],gol[15],jumdata=3;
char*Nap;
float gapok,pajak,gaber;
cout<<"\nInput Data Pegawai";
for(i=0;i<jumdata;i++){
cout<<"\nNIK :";cin>>nik[i];
cout<<"\nGol :";cin>>gol[i];
}
clrscr();
cout<<"\n\t\tInformasi Pembuatan Gaji Pegawai";
cout<<"\n===============================================";
cout<<"\nNo NIK Nama Pegawai Golongan Gaji pokok Pajak Gaji Bersih";
cout<<"\n===============================================";
for(i=0;i<jumdata;i++){
if(nik[i]==1 && gol[i]==1){
Nap="Hendro";
gapok=1500000;
}else if(nik[i]==2 && gol[i]==2){
Nap="Dian";
gapok=2500000;
}else if(nik[i]==3 && gol[i]==3){
Nap="Jhoni";
gapok=3500000;
}
pajak=0.05*gapok;
gaber=gapok-pajak;
gotoxy(1,6+i);cout<<9;
gotoxy(5,6+i);cout<<nik[i];
gotoxy(10,6+i);cout<<Nap;
gotoxy(23,6+i);cout<<gol[i];
gotoxy(33,6+i);cout<<gapok;
gotoxy(43,6+i);cout<<pajak;
gotoxy(52,6+i);cout<<gaber;
}
cout<<"\n===============================================";
cout<<"\n\t-_-_-_-_-Michael Simangunsong-_-_-_-_-";
getch();
}
#include "conio.h"
void main(){
int i,nik[15],gol[15],jumdata=3;
char*Nap;
float gapok,pajak,gaber;
cout<<"\nInput Data Pegawai";
for(i=0;i<jumdata;i++){
cout<<"\nNIK :";cin>>nik[i];
cout<<"\nGol :";cin>>gol[i];
}
clrscr();
cout<<"\n\t\tInformasi Pembuatan Gaji Pegawai";
cout<<"\n===============================================";
cout<<"\nNo NIK Nama Pegawai Golongan Gaji pokok Pajak Gaji Bersih";
cout<<"\n===============================================";
for(i=0;i<jumdata;i++){
if(nik[i]==1 && gol[i]==1){
Nap="Hendro";
gapok=1500000;
}else if(nik[i]==2 && gol[i]==2){
Nap="Dian";
gapok=2500000;
}else if(nik[i]==3 && gol[i]==3){
Nap="Jhoni";
gapok=3500000;
}
pajak=0.05*gapok;
gaber=gapok-pajak;
gotoxy(1,6+i);cout<<9;
gotoxy(5,6+i);cout<<nik[i];
gotoxy(10,6+i);cout<<Nap;
gotoxy(23,6+i);cout<<gol[i];
gotoxy(33,6+i);cout<<gapok;
gotoxy(43,6+i);cout<<pajak;
gotoxy(52,6+i);cout<<gaber;
}
cout<<"\n===============================================";
cout<<"\n\t-_-_-_-_-Michael Simangunsong-_-_-_-_-";
getch();
}