Thursday, January 17, 2013
membuat program barang di pascal
program barang;
uses crt;
var
nBarang : string;
cBarang,TTL,JMLH,uByr,KBL : real;
HRG : integer;
begin
clrscr;
gotoxy(4,3); write('kode barang = '); readln(cBarang);
gotoxy(4,4); write('nama barang = '); readln(nBarang);
gotoxy(4,5); write('harga = '); readln(HRG);
gotoxy(4,6); write('jumlah beli = '); readln(JMLH);
TTL := (HRG * JMLH);
gotoxy(4,7); write('TOTAL = ', TTL:0:0);
gotoxy(4,10); write ('Uang bayar = '); readln(uByr);
KBL := (uByr - TTL);
gotoxy(4,12); write('Uang kembali = ', KBL:9:2);
readln
end.
membuat program gaji kariawan di pascal
Uses crt;
Var
nama:string[20];jabatan:string;
Gaji:longint;
Tunj,ppn,Total,gajibersih:real;
Begin
Clrscr;
Write( 'Nama Karyawan : '); readln(nama);
Write('Masukkan Jabatan : '); readln(jabatan);
If (jabatan='Direktur') or (jabatan='direktur') then
Begin
Gaji:=3000000;
Tunj:=0.1* gaji;
End
Else If (jabatan='Manager') or (jabatan='manager') then
Begin
Gaji:=2000000;
Tunj:=0.01* gaji;
End
Else If (jabatan='Karyawan') or (jabatan='karyawan') then
Begin
Gaji:=1000000;
Tunj:=0.1* gaji;
End
Else
Begin
Gaji:=800000;
Tunj:=0.1* gaji;
End;
Writeln('Gaji Bersih : Rp.',gaji);
Writeln('Tunjangan Jabatan : Rp.',tunj:9:2);
Ppn:=0.2*gaji;
Writeln('PPN 10 % : Rp.',ppn:9:2);
Total:=gaji+total;
Writeln('Total Gaji : Rp.',total:9:2);
Readln
End.
Var
nama:string[20];jabatan:string;
Gaji:longint;
Tunj,ppn,Total,gajibersih:real;
Begin
Clrscr;
Write( 'Nama Karyawan : '); readln(nama);
Write('Masukkan Jabatan : '); readln(jabatan);
If (jabatan='Direktur') or (jabatan='direktur') then
Begin
Gaji:=3000000;
Tunj:=0.1* gaji;
End
Else If (jabatan='Manager') or (jabatan='manager') then
Begin
Gaji:=2000000;
Tunj:=0.01* gaji;
End
Else If (jabatan='Karyawan') or (jabatan='karyawan') then
Begin
Gaji:=1000000;
Tunj:=0.1* gaji;
End
Else
Begin
Gaji:=800000;
Tunj:=0.1* gaji;
End;
Writeln('Gaji Bersih : Rp.',gaji);
Writeln('Tunjangan Jabatan : Rp.',tunj:9:2);
Ppn:=0.2*gaji;
Writeln('PPN 10 % : Rp.',ppn:9:2);
Total:=gaji+total;
Writeln('Total Gaji : Rp.',total:9:2);
Readln
End.
memmbuat program barang di xbase
DO WHILE .T.
CLEAR
cBrg = SPACE(10)
cNbrg = SPACE(20)
cHrg = SPACE(8)
STORE SPACE(6) to cJbli
STORE 0 TO nTtl=cHrg*cJbli
@ 1,4 SAY "Kode Barang : "GET cBrg
@ 2,4 SAY "Nama Barang : "GET cNbrg
@ 3,4 SAY "Harga : "GET cHrg
@ 4,4 SAY "Jumlah Beli : "GET cJbli
READ
@ 9,27 SAY "PT.TURUN NAIK"
@ 11,30 SAY "NOTA BAYAR"
@ 12,30 SAY "==========================="
@ 14,3 SAY " No. Barang : "+UPPER (cBrg)
@ 15,3 SAY " Nama Barang : "+UPPER (cNbrg)
@ 16,3 SAY " Harga : "+UPPER (cHrg)
@ 17,3 SAY " Jumlah Beli : "+UPPER (cJbli)
cTtl = cHrg*cJbli
@ 18,3 SAY "Total : "(cTtl)
@ 19,25 SAY " Uang Bayar : GET cByr
@ 20,3 SAY "uang kembali : "(cBlk)
cBlk = cByr - Ttl
@ 21,3 SAY cBlk PICT "99,999,999"
cLagi = " "
@ 7,50 SAY " mau proses lagi ? [y/t] " GET cLagi
READ
IF UPPER (cLagi) = "T"
CLEAR
@ 11,30 SAY " - THANK YOU - "
EXIT
ENDIF
ENDDO
membuat program score di xbase
CLEAR
@ 1,0 TO 23,79
@ 2,10 TO 22,10
I = 14
DO WHILE I < 77
@ 3,I TO 22,I
I = I+4
ENDDO
I = 3
DO WHILE I< 23
@ I,1 TO I,78
I = I + 2
ENDDO
@ 22,1 SAY "Total"
@ 2,75 SAY "Tot"
@ 2,3 SAY "SISWA"
I = 1
X = 12
DO WHILE I < 17
@ 2,X SAY LTRIM(STR(I))
I = I + 1
X = X + 4
ENDDO
I = 4
DO WHILE I < 21
cNama = SPACE(9)
@ I,1 GET cNama PICT "!!!!!!!!!!"
READ
I = I + 2
ENDDO
I = 1
Y = 12
STORE 0 TO nT1,nT2,nT3,nT4,nT5,nT6,nT7,nT8,nT9
DO WHILE Y < 75
X = 4
nJum = 0
DO WHILE X < 21
cNil = "0"
@ X,Y GET cNil
READ
IF cNil = "1" THEN
nJum = nJum + 1
DO CASE
CASE X = 4
nT1 = nT1 + 1
CASE X = 6
nT2 = nT2 + 1
CASE X = 8
nT3 = nT3 + 1
CASE X = 10
nT4 = nT4 + 1
CASE X = 12
nT5 = nT5 + 1
CASE X = 14
nT6 = nT6 + 1
CASE X = 16
nT7 = nT7 + 1
CASE X = 18
nT8 = nT8 + 1
CASE X = 20
nT9 = nT9 + 1
ENDCASE
ENDIF
X = X + 2
ENDDO
@ X,Y SAY LTRIM(STR(nJum))
Y = Y + 4
ENDDO
@ 4,76 SAY LTRIM(STR(nT1))
@ 6,76 SAY LTRIM(STR(nT2))
@ 8,76 SAY LTRIM(STR(nT3))
@ 10,76 SAY LTRIM(STR(nT4))
@ 12,76 SAY LTRIM(STR(nT5))
@ 14,76 SAY LTRIM(STR(nT6))
@ 16,76 SAY LTRIM(STR(nT7))
@ 18,76 SAY LTRIM(STR(nT8))
@ 20,76 SAY LTRIM(STR(nT9))
READ
Sunday, January 13, 2013
membuat program gaji dengan exbase
DO WHILE .T.
CLEAR
STORE 0 TO nAnak, nGaji, nLembur
cNip = SPACE(5)
STORE SPACE(35) TO cNama, cJab
cStat = SPACE(2)
@ 1,4 SAY "Nomor Pegawai : " GET cNip
@ 2,4 SAY "Nama Pegawai : " GET cNama
@ 3,4 SAY "Jabatan : " GET cJab
@ 4,4 SAY "sTatus (S/K/J/D): " Get cStat
READ
cStat = UPPER (cStat)
IF cStat = "K" .OR.cStat = "J" .OR. cStat = "D" THEN
@ 4,30 SAY "Jumlah Anak : " GET nAnak
ENDIF
@ 5,4 SAY "Gaji Pokok : " GET nGaji
@ 6,4 SAY "Jam Lembur : " GET nLembur
READ
@ 8,1 TO 23,78 DOUBLE
@ 10,2 TO 10,77
SET COLOR TO G+
@ 9,27 SAY "PT. MAHAKAM INDAH PERMAI"
@ 11,30 SAY "SLIP GAJI KARYAWAN"
SET COLOR TO
@ 12,30 SAY "=================="
@ 14,3 SAY "Nomor Induk Pegawai : "+UPPER (cNip)
@ 15,3 SAY "Nama Pegawai : "+UPPER (cNama)
@ 16,3 SAY "Jabatan : "+UPPER (cJab)
IF cStat = "K" THEN
cSK = "Kawin"
nTjk = 100000 + 50000 * nAnak
else
IF cStat = "J" THEN
cSK = "Janda"
nTjk = 200000 + 50000 * nAnak
else
IF cStat = "D" THEN
cSK = "Duda"
nTjk = 150000 + 50000 * nAnak
ELSE
IF cStat = "S"
cSK = "Singe"
nTjk= 100000
ELSE
cSK = "Tidak Jelas"
nTjk = 0
ENDIF
ENDIF
ENDIF
ENDIF
@ 17,3 SAY "Status Keluarga : "+cSK
nUlemb = nLembur * nGaji / 173
nInsentif = 0.25 * (nGaji + nTjk + nUlemb)
nTHP = nGaji + nTjk + nUlemb + nInsentif
nTHPS= nTHP * 12
IF nTHPS > 50000000
nPPH=0.3*(nTHPS-500000000)+0.25*250000000+0.15
*200000000+0.05*50000000
ELSE
IF nTHPS > 250000000
nPPH=0.25*(nTHPS-250000000)+0.15*200000000+0.05*50000000
ELSE
IF nTHPS > 50000000
nPPH = 0.15*(nTHPS-50000000)+0.05*50000000
ELSE
nPPH = 0.05 * nTPHS
ENDIF
ENDIF
ENDIF
nPPhb = nPPh/12
nTP = nTHP-nPPhb
@ 19,3 SAY "Gaji Pokok : Rp"
@ 20,3 SAY "Tunjangan Keluarga : Rp"
@ 21,3 SAY "Upah Lembur : Rp"
@ 19,41 SAY "Insentif : Rp"
@ 20,41 SAY "THP : Rp"
@ 21,41 SAY "pajak per bulan : Rp"
@ 22,41 SAY "TP : Rp"
@ 19,28 SAY nGaji PICT "99,999,999"
@ 20,28 SAY nTjk PICT "99,999,999"
@ 21,28 SAY nUlemb PICT "99,999,999"
@ 19,66 SAY nInsentif PICT "99,999,999"
@ 20,66 SAY nTHP PICT "99,999,999"
@ 21,66 SAY nPPhb PICT "99,999,999"
@ 22,66 SAY nTP PICT "99,999,999"
cLagi = " "
SET COLOR TO B+*
@ 7,50 SAY "Mau Proses Lagi ? [Y/T] " GET cLagi
SET COLOR TO
READ
IF UPPER (cLagi) = "T"
CLEAR
SET COLOR TO G+*
@ 11,30 SAY "- (*_*) - THANK YOU - (*_*) - "
SET COLOR TO
EXIT
ENDIF
ENDDO
CLEAR
STORE 0 TO nAnak, nGaji, nLembur
cNip = SPACE(5)
STORE SPACE(35) TO cNama, cJab
cStat = SPACE(2)
@ 1,4 SAY "Nomor Pegawai : " GET cNip
@ 2,4 SAY "Nama Pegawai : " GET cNama
@ 3,4 SAY "Jabatan : " GET cJab
@ 4,4 SAY "sTatus (S/K/J/D): " Get cStat
READ
cStat = UPPER (cStat)
IF cStat = "K" .OR.cStat = "J" .OR. cStat = "D" THEN
@ 4,30 SAY "Jumlah Anak : " GET nAnak
ENDIF
@ 5,4 SAY "Gaji Pokok : " GET nGaji
@ 6,4 SAY "Jam Lembur : " GET nLembur
READ
@ 8,1 TO 23,78 DOUBLE
@ 10,2 TO 10,77
SET COLOR TO G+
@ 9,27 SAY "PT. MAHAKAM INDAH PERMAI"
@ 11,30 SAY "SLIP GAJI KARYAWAN"
SET COLOR TO
@ 12,30 SAY "=================="
@ 14,3 SAY "Nomor Induk Pegawai : "+UPPER (cNip)
@ 15,3 SAY "Nama Pegawai : "+UPPER (cNama)
@ 16,3 SAY "Jabatan : "+UPPER (cJab)
IF cStat = "K" THEN
cSK = "Kawin"
nTjk = 100000 + 50000 * nAnak
else
IF cStat = "J" THEN
cSK = "Janda"
nTjk = 200000 + 50000 * nAnak
else
IF cStat = "D" THEN
cSK = "Duda"
nTjk = 150000 + 50000 * nAnak
ELSE
IF cStat = "S"
cSK = "Singe"
nTjk= 100000
ELSE
cSK = "Tidak Jelas"
nTjk = 0
ENDIF
ENDIF
ENDIF
ENDIF
@ 17,3 SAY "Status Keluarga : "+cSK
nUlemb = nLembur * nGaji / 173
nInsentif = 0.25 * (nGaji + nTjk + nUlemb)
nTHP = nGaji + nTjk + nUlemb + nInsentif
nTHPS= nTHP * 12
IF nTHPS > 50000000
nPPH=0.3*(nTHPS-500000000)+0.25*250000000+0.15
*200000000+0.05*50000000
ELSE
IF nTHPS > 250000000
nPPH=0.25*(nTHPS-250000000)+0.15*200000000+0.05*50000000
ELSE
IF nTHPS > 50000000
nPPH = 0.15*(nTHPS-50000000)+0.05*50000000
ELSE
nPPH = 0.05 * nTPHS
ENDIF
ENDIF
ENDIF
nPPhb = nPPh/12
nTP = nTHP-nPPhb
@ 19,3 SAY "Gaji Pokok : Rp"
@ 20,3 SAY "Tunjangan Keluarga : Rp"
@ 21,3 SAY "Upah Lembur : Rp"
@ 19,41 SAY "Insentif : Rp"
@ 20,41 SAY "THP : Rp"
@ 21,41 SAY "pajak per bulan : Rp"
@ 22,41 SAY "TP : Rp"
@ 19,28 SAY nGaji PICT "99,999,999"
@ 20,28 SAY nTjk PICT "99,999,999"
@ 21,28 SAY nUlemb PICT "99,999,999"
@ 19,66 SAY nInsentif PICT "99,999,999"
@ 20,66 SAY nTHP PICT "99,999,999"
@ 21,66 SAY nPPhb PICT "99,999,999"
@ 22,66 SAY nTP PICT "99,999,999"
cLagi = " "
SET COLOR TO B+*
@ 7,50 SAY "Mau Proses Lagi ? [Y/T] " GET cLagi
SET COLOR TO
READ
IF UPPER (cLagi) = "T"
CLEAR
SET COLOR TO G+*
@ 11,30 SAY "- (*_*) - THANK YOU - (*_*) - "
SET COLOR TO
EXIT
ENDIF
ENDDO
Subscribe to:
Posts (Atom)