var s,sex,tgl_lahir : string; a,b,c,d,e,f,g,o : string;
function bulanx(var str:string):string; var output:string; begin if str='01' then output := 'Januari' else if str='02' then output := 'Februari' else if str='03' then output :='Maret' else if str='04' then output:= 'April' else if str='05' then output:= 'Mei' else if str='06' then output:= 'Juni' else if str='07' then output:= 'Juli' else if str='08' then output:= 'Agustus' else if str='09' then output:= 'September' else if str='10' then output:= 'Oktober' else if str='11' then output:= 'November' else if str='12' then output:= 'Desember' else output:= 'Tidak Dikenal';
bulanx:= output; end;
begin clrscr; write ('masukan nama : '); readln (s); write ('masukan NIP : '); readln (o); a := o[1]+o[2]+o[3]+o[4]; b := o[5]+o[6]; b := bulanx(b);
c := o[7]+o[8]; d := o[9]+o[10]+o[11]+o[12]; e := o[13]+o[14]; e:= bulanx(e);
f := o[15]+o[16]; g := o[17]+o[18]+o[19];
tgl_lahir := c + ' ' + b + ' ' + a;
if f='01' then sex:= 'Laki Laki' else if f='02' then sex:= 'Perempuan' else sex:= 'kelamin tidak diketahui';
writeln('Nama : ',s); writeln('Tanggal Lahir : ',tgl_lahir); writeln('Tahun Masuk : ',d); writeln('Bulan Masuk : ',e); writeln('Sex : ',sex); writeln('No urut : ',g); readln; end.
uses wincrt; var gol:integer; gaji,pajak,bonus,libur,a,b,upah,jam: real; nama:string; begin clrscr; write('Nama Pekerja: ');readln(nama); write('Golongan : ');readln(gol); If gol>6 then writeln ('golongan yang anda masukkan salah!') else write('Jam Kerja: ');readln(jam); write('Upah Per Jam: ');readln(upah);
case gol of
1: begin gaji:=gol*jam*upah; pajak:=2.5/100*gaji; a:=21 div gol; b:=21 mod gol; bonus:=gol*25000; end;
2: begin gaji:=gol*jam*upah; pajak:=2.5/100*gaji; a:=21 div gol; b:=21 mod gol; bonus:=gol*25000; end;
3: begin gaji:=gol*jam*upah; pajak:=2.5/100*gaji; a:=21 div gol; b:=21 mod gol; bonus:=gol*25000; end;
4: begin gaji:=gol*jam*upah; pajak:=6.5/100*gaji; a:=7 div gol; b:=7 mod gol; bonus:=gol*50000; end;
5: begin gaji:=gol*jam*upah; pajak:=3.5/100*gaji; a:=7 div gol; b:=7 mod gol; bonus:=gol*45000; end;
6: begin gaji:=gol*jam*upah; pajak:=5.5/100*gaji; a:=7 div gol; b:=7 mod gol; bonus:=gol*40000; end; end; if b>0 then libur:=a+1 else libur:=a;
writeln('Gaji Anda= Rp. ',gaji:0:2); writeln('Anda Terkena Pajak= Rp. ',pajak:0:2); writeln('Anda Mendapat Bonus= Rp. ',bonus:0:2); writeln('Anda Boleh Cuti Sebanyak ',libur:0:0,' hari'); readkey; end.
uses crt; var data: string; a,i,j: integer; begin clrscr; write('Masukan Kata= '); readln(data); a:=length(data); gotoxy(40-a div 2,12-a div 2); for i:=1 to a do begin gotoxy((40-a div 2)+i,(12-a div 2)+i); write(data[i]); end;
for j:=1 to a do begin gotoxy((40-a div 2)+j,(14+a div 2)-j); write(data[j]); end; readln; end.