NAMA : NURUL KHAKIMAH
NIM :
SIA201121
UAS :
ALGORITMA DAN PEMROGRAMAN
SMT : 1
USES WINCRT;
VAR
NAMA
: ARRAY[1..10] OF STRING[25];
GOL
: ARRAY[1..10] OF STRING[5];
STATUS: ARRAY[1..10] OF CHAR;
GAJI : ARRAY[1..10] OF LONGINT;
LAGI : CHAR;
JUNAK : ARRAY[1..10] OF BYTE;
X,Y,Z : BYTE;
JMLPTKP,PTKP,PTKPA,PTKPI :LONGINT;
PKP,PPH : REAL;
BEGIN
LAGI :='Y';
X:=0;
WHILE LAGI ='Y' DO
BEGIN
CLRSCR;
X:=X+1;
WRITELN;
WRITE('NAMA
KARYAWAN: '); READLN(NAMA[X]);
WRITE('GAJI : '); READLN(GAJI[X]);
WRITE('STATUS : '); READLN(STATUS[X]);
WRITE('JUMLAH
ANAK : '); READLN(JUNAK[X]);
WRITELN;
WRITE('INPUT DATA LAGI [Y/T] :
');READLN(LAGI);
LAGI:=UPCASE(LAGI);
END;
CLRSCR;
WRITELN;
WRITELN(' DAFTARPOTONGANPAJAK
':40);
WRITELN('==============================================================');
WRITELN;
WRITELN('NO NAMA STATUS JUNAK
GAJI PTKP JML PKP
PPH');
WRITELN(' WP ISTRI ANAK PTKP ');
WRITELN('===============================================================');
FOR X:=1 TO X DO
BEGIN
PTKP:=1000;
IF STATUS[X]='K'THEN
PTKPI:=500;
PTKPA:=500*JUNAK[X];
IF
JUNAK[X]<3 THEN
JMLPTKP:=PTKP+PTKPI+PTKPA
ELSE
IF JUNAK[X]=0 THEN
JMLPTKP:=PTKP+PTKPI
ELSE
JMLPTKP:=PTKP;
IF GAJI[X]<PTKP THEN
PKP:=0
ELSE
PKP:=GAJI[X]-JMLPTKP;
IF PKP<10000 THEN
BEGIN
PPH:=(10/100*PKP);
END
ELSE
IF PKP<20000 THEN
BEGIN
PPH:=(10/100*10000)+(PKP-10000)*15/100;
END
ELSE
PPH:=(10/100*10000)+(15/100*10000)+(PKP-20000)*20/100;
WRITELN(X:1,NAMA[X]:7,STATUS[X]:7,JUNAK[X]:8,GAJI[X]:8,PTKP:8,PTKPI:8,PTKPA:8,JMLPTKP:8,PKP:8:0,PPH:8:0);
END;
END.