USES WINCRT;

VAR X, Y, I, JLHBRG, JLHS : INTEGER;

    NAMA, JENIS : ARRAY[1..20] OF STRING;

    HRG, QTY, HRGTOT, PAJAK, NETHRG : ARRAY[1..20] OF REAL;

    JLHTOT, JLHPJK, JLHNET : REAL;

    BEGIN

         WRITE('JUMLAH BARANG:'); READLN(JLHBRG);

         JLHTOT := 0;

         JLHPJK := 0;

         JLHNET := 0;

         FOR I := 1 TO JLHBRG DO

         BEGIN CLRSCR;

               WRITE('NAMA BARANG:'); READLN(NAMA[I]);

                WRITE('HARGA:'); READLN(HRG[I]);

               WRITE('QTY:'); READLN (QTY[I]);

               HRGTOT[I] := HRG[I] * QTY[I];

               PAJAK[I] := HRGTOT[I] * 0.05;

               NETHRG[I] := HRGTOT[I] - PAJAK[I];

               JLHTOT := JLHTOT + HRGTOT[I];

               JLHPJK := JLHPJK + PAJAK[I];

               JLHNET := JLHNET + NETHRG[I];

         END;

         CLRSCR;

         FOR Y := 1 TO 70 DO WRITE('-');

         GOTOXY (2,2); WRITE ('NAMA BARANG');

         GOTOXY (20,2); WRITE ('HARGA');

         GOTOXY (30,2); WRITE ('QTY');

         GOTOXY (36,2); WRITE ('HARGA TOTAL');

         GOTOXY (48,2); WRITE ('PAJAK');

         GOTOXY (60,2); WRITE ('NET HARGA');

         FOR Y := 1 TO 70 DO WRITE('-');

         FOR I := 1 TO JLHBRG DO

         BEGIN

              GOTOXY (2,3+I); WRITE(NAMA[I]);

              GOTOXY (20,3+I); WRITE(HRG[I]:8:0);

              GOTOXY (30,3+I); WRITE(QTY[I]:3:0);

              GOTOXY (36,3+I); WRITE(HRGTOT[I]:8:0);

              GOTOXY (48,3+I); WRITE(PAJAK[I]:8:0);

              GOTOXY (60,3+I); WRITE(NETHRG[I]:8:0);

         END; WRITELN;

         FOR Y := 1 TO 70 DO WRITE('-');

         GOTOXY (10,5+I); WRITE ('JUMLAH');

         GOTOXY (36,5+I); WRITE (JLHTOT:8:0);

         GOTOXY (48,5+I); WRITE (JLHPJK:8:0);

         GOTOXY (60,5+I); WRITE (JLHNET:8:0);

         FOR Y := 1 TO 70 DO WRITE('-');

    END.

 

Soal UTS

06/12/2012

0 Comments

 
uts.docx
File Size: 34 kb
File Type: docx
Download File

 
 
program.txt
File Size: 4 kb
File Type: txt
Download File

 
 
modul-pemrograman-osn-2009.pdf
File Size: 415 kb
File Type: pdf
Download File

 
 
tugas_uas.rar
File Size: 46 kb
File Type: rar
Download File

Bagi yang masih bingung / belum mengerti  dengan menggunakan program TPW (Turbo Pascal Windows),, ini ada beberapa program yang bisa kamu jadikan contoh seperti membuat program yang berhubungan dengan  fisika, yakni "konversi suhu".

Semoga Bermanfaat :)
 

    Prokom

    Suatu matakuliah yang mempelajari tentang bahasa pemrograman (bahasa C++),, TPW,, dll...

    Archives

    June 2012

    Categories

    All