makalah algo

232
PROGRAM PEMESANAN TIKET BUS TUGAS ALGORITMA dan PEMROGRAMAN DI SUSUN OLEH : WIDIA DWI CANDRA Npm : 09312410 M. FADHIL NOVIANTIKA Npm : 09312490 ARIF SETIAWAN Npm : 09311331 PERGURUAN TINGGI TEKNOKRAT STMIK – AMIK – STBA

Upload: riski-kurnia

Post on 18-Apr-2015

64 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Makalah Algo

PROGRAM PEMESANAN TIKET BUS

TUGAS

ALGORITMA dan PEMROGRAMAN

DI SUSUN OLEH :

WIDIA DWI CANDRANpm : 09312410

M. FADHIL NOVIANTIKANpm : 09312490

ARIF SETIAWANNpm : 09311331

PERGURUAN TINGGI

TEKNOKRAT

STMIK – AMIK – STBA

2010

Page 2: Makalah Algo

PRAKATA

Puji syukur kami panjatkan kehadirat Tuhan Yang Maha Esa, karena berkat rahmat

dan karunianya-Nya kami dapat menyelesaikan penulisan makalah Algoritma dan

Pemrograman.

Dalam menyelesaikan makalah ini, kami telah menerima banyak bantuan dan

bimbingan dari berbagai pihak. Oleh karena itu, pada kesempatan ini kami

menyampaikan terima kasih kepada:

1. Yusra Fernando, S.Kom.,

2. Frenky Andrianto,

3. Orang tua,

4. Dan teman-teman.

kami menyadari bahwa karya tulis ini masih jauh dari sempurna. Untuk itu penulis

sangat mengharapkan kritik dan saran yang membangun. Walaupun demikian,

semoga informasi yang terdapat dalam karya tulis ini dapat bermanfaat.

Bandar Lampung, 25 Januari 2010

Penulis

Page 3: Makalah Algo

Pendahuluan

Saat ini , dengan berkembangya teknik pemrograman terstruktur, orang tidak lagi

memecahkan masalah dengan langsung menulis programnya dalam bahasa

pemrograman.

Orang mulai memikirkan suatu cara penyelesaian masalah yang akan diprogram

dengan menekankan pada desain atau rancangan yang mewakili pemecahan

masalah tersebut. Desain menyajikan cara berpikir si pemrogram dalam

menyelesaikan masalah. Desain berisi urutan langkah-langkah pencapaian solusi

yang ditulis dalam notasi-notasi deskriptif. Urutan langkah-langkah yang sistematis

untuk menyelesaikan sebuah masalah dinamakan algoritma.

Page 4: Makalah Algo

ALGORITMA dan PEMROGRAMAN

I. Algoritma adalah urutan langkah-langkah logis penyelesaian masalah yang disusun secara sistematis.

Struktur dasar Algoritma:

1. Runtunan (Sequence) Terdiri dari 1 atau lebih intruksi dan tiap intruksi dibuat secara

berurutan. Contohnya : A1, A2, A3,…2. Pemilihan (Selection)

Sebuah intruksi dikerjakan jika suatu kondisi terpenuhi3. Pengulangan (Repetion)

Kemampuan untuk mengerjakan hal yang sama secara berulang-ulang.

II.Program adalah sekumpulan intruksi yang merupakan penyelesaian masalah.

Notasi Algoritma:

1. Untaian kalimat deskriptif Merupakan langkah-langkah pemecahan masalah dituangkan dengan

untaian kalimat deskriptif.Contoh:PROGRAM Luas_Segitiga Program untuk menghitung luas segitiga.ALGORITMA :1. Masukkan/input alas dan tinggi segitiga.2. Hitung luas segitiga dengan rumus :

Luas = 0.5 x alas x tinggi 3. Tampilkan luas segitiga.

2. Flowchart (diagram alir) Flowchart berasal dari kata

-Flow berarti aliran.-Chart berarti gambar, diagram atau simbol-simbol. Flowchart merupakan diagram alir yang menggambarkan langkah-langkah pemecahan masalah.

Page 5: Makalah Algo

Bentuk-bentuk flowchart:

3. Pseudocode PROGRAM SEGITIGA

{Program untuk menghitung luas Segitiga.}

DEKLARASIAlas,tinggi : integerluas : real

DESKRIPSI :read(alas,tinggi)

Simbol titik terminal, digunakan untuk menunjukkan awal dan akhir suatu proses.

Simbol persiapan, digunakan untuk memberi nilai awal suatu besaran.

Simbol proses terdefinisi, digunakan untuk menunjukkan suatu operasi yang rinciannya ditunjukkan di tempat lain.

Simbol keputusan, digunakan untuk sautu penyeleksian kondisi.

Simbol penghubung, digunakan untuk menunjukkan sambungan dari bagan alir yang terputus di halaman yang berbeda.

Simbol penghubung, digunakan untuk menunjukkan sambungan dari bagan alir yang terputus di halaman yang masih sama.

Simbol garis alir, digunakan untuk menunjukkan arus dari proses.

Simbol proses, digunakan untuk mewakli suatu proses.

Simbol input/output, digunakan untuk mewakili data input/output.

KeteranganSimbol

Page 6: Makalah Algo

luas = 0.5 * alas * tinggi write(luas)

TIPE DATA

Bilangan lojik (BOOLEAN)

Dipakai untuk menyatakan data yang isinya YA atau TIDAK, BENAR atau

SALAH, ON atau OFF.

Hanya mengenal dua buah nilai, yaitu TRUE (Benar) atau (FALSE (Salah).

Bilangan bulat (INTEGER)

Dipakai untuk menyatakan bilangan yang tidak mempunyai pecahan

desimal, misalnya : 34,8,1203,7,4324553, dll.

Bilangan riil (REAL)

Dipakai untuk menyatakan bilangan yang mempunyai pecahan desimal,

misalnya 3.65, 0.0045, 29.0, dll.

Karakter(CHARACTER)

Dipakai untuk menyimpan 1 huruf.

Yang termasuk karakter :

o Huruf-huruf abjad (‘A’, ’p’, ’R’, ’Z’, dll)

o Angka (‘0’ – ‘9’)

o Semua tanda baca (‘!’, ’?’, ’,’, dll)

o Karakter-karakter khusus (‘@’, ’$’, ’#’, dll)

String

Page 7: Makalah Algo

Dipakai untuk menyatakan sederatan karakter yang membentuk kesatuan,

misalnya ‘Budi Raharjo’, ‘Jl. Kartini No. 15’.

OPERATOR

Merupakan simbol-simbol yang digunakan untuk operasi data tertentu saat

dilakukan eksekusi program.

Operator dikelompokkan menjadi :

Operator Penugasan (Assignment)

o Merupakan operator yang paling sering digunakan.

o Digunakan untuk mengisikan nilai ke variabel.

o Notasi algoritma : “=“

o Notasi Pascal/Delphi : “:=“

Operator Aritmetika

Digunakan untuk operasi perhitungan.

Operator aritmetika pada pascal :

Operator Operasi

+ Penambahan

− Pengurangan

* Perkalian

/ Pembagian

Div Pembagian bulat

Mod Sisa pembagian

Page 8: Makalah Algo

Operator Pembanding (Relasional)

Digunakan untuk membandingkan dua nilai/variabel dan hasilnya

adalah TRUE atau FALSE.

Operator pembanding pada pascal:

Operator Operasi

= Sama dengan<> Tidak sama dengan< Lebih kecil> Lebih besar

<= Lebih kecil atau sama dengan

>= Lebih besar atau sama dengan

Operator Logika

Digunakan untuk membandingkan dua ekspresi/ungkapan boolean

dan hasilnya adalah TRUE atau FALSE. Operator logika pada pascal:

Operator Operasi

NOT Negasi (pembalikan logika)

OR Logika or

AND Logika and

XOR Logika xor

Page 9: Makalah Algo

Sebuah program dibangun dari tiga buah logika dasar pemrograman, yaitu :

1. Logika Urut / Runtunan (Sequence)

Logika pemrograman yang paling sederhana.

Digunakan pada program sederhana yang hanya berupa runtunan satu

atau lebih perintah.

Konsep logika urut :

Tiap perintah dikerjakan satu per satu.

Tiap perintah dilaksanakan tepat sekali.

Urutan pelaksanaan perintah sama dengan uruta n penulisan

algoritma/program.

2. Logika Percabangan / Pemilihan / Penyeleksian Kondisi

(Selection)

Digunakan jika di dalam program, sebuah perintah dikerjakan jika

persyaratan atau kondisi tertentu dipenuhi.

Jenis-jenis logika percabangan :

Percabangan If Tunggal

Digunakan jika pemilihan hanya memberikan satu pilihan yang

dilaksakan bila kondisi (persyaratan) dipenuhi (bernilai benar), dan

tidak memberikan pilihan lain yang dilaksanakan bila kondisi bernilai

salah.

Notasi Pseudocode :

Page 10: Makalah Algo

if <Kondisi> then

<Pernyataan-1>

<Pernyataan-2>

…………………

<Pernyataan-n>

endif

Percabangan If Ganda

Digunakan jika pemilihan memberikan dua alternatif pilihan.

Notasi Pseudocode :if <Kondisi> then

<Pernyataan-1>

else

<Pernyataan-2>

endif

Percabangan If Majemuk

Digunakan jika pemilihan memberikan lebih dari dua alternatif

pilihan.

Notasi Pseudocode (4 pilihan) :

if <Kondisi-1> then

<Pernyataan-1>

else if <Kondisi-2> then

<Pernyataan-2>

else if <Kondisi-3> then

<Pernyataan-3>

else

Page 11: Makalah Algo

<Pernyataan-4>

endif

Percabangan If Tersarang

Percabangan Case

Digunakan untuk menyederhanakan konstruksi if..else if yang terlalu

banyak.

3. Pengulangan / Looping (Repetition)

Berfungi untuk mengulangi satu atau beberapa perintah sebanyak yang

diinginkan.

Perulangan pada pascal dibagi menjadi tiga, yaitu:

1. FOR..TO/DOWNTO..DO

Digunakan, apabila sudah diketahui ingin diulang sebanyak beberapa kali

perulangannya

Perulangan akan mengeksekusi perintah yang berada didalam blok

perulangan, selama kondisi BENAR

2. WHILE..DO

Digunakan apabila belum diketahui ingin diulang sebanyak

berapa kali perulangannya

Perulangan akan mengeksekusi perintah yang berada didalam

blok perulangan, selama kondisinya BENAR

3. REPEAT..UNTIL

Digunakan, apabila belum diketahui ingin di ulang sebanyak

beberapa kali perulangan

Page 12: Makalah Algo

Perulangan akan mengeksekusi perintah yang berada didalam

blok perulangan, selama kondisinya SALAH

Perulangan akan mengeksekusi perintah minimal 1x

PROSEDUR DAN FUNGSI

Prosedure adalah suatu program terpisah dalam blok sendiri yang berfungsi

sebagai sub program . Prosedur diawali dengan kata PROCEDURE pada

bagian deklarasi. Prosedure dipanggil dan digunakan dalam blok program

lainnya dengan cara menyebut nama prosedurnya.

Prosedure dibagi menjadi 2:

- Procedure Non Parameter

- Procedure Berparameter

Fungsi yaitu suatu modul program terpisah dari program utama yang

diletakkan dalam blok tersendiri yang berfungsi sebagai bagian dari

program. Namun fungsi memiliki perbedaan mendasar dengan prosedur

yaitu: fungsi memberikan nilai balik (return) sedangkan prosedur tidak.

Fungsi diawali dengan kata cadangan FUNCTION.

Function dibagi menjadi 2:

- Function Non Parameter

- Function Berparameter

PSEUDOCODE

Page 13: Makalah Algo

PROGRAM PEMESANAN TIKET BUS;

USES CRT;

VAR ULANG : CHAR;

JUM : INTEGER;

PROCEDURE GARIS; {PROC NON PARAMETER}

VAR

X : BYTE;

nama,telp:string;

BEGIN

TEXTCOLOR(15);

textcolor(yellow);

writeln('=================================');

writeln('| PEMESANAN TIKET BUS |');

writeln('=================================');

write('Nama Pemesan : '); readln(nama);

write('No HP/Telp : '); readln(telp);

writeln('=================================');

gotoxy(40,1);write('===============================');

gotoxy(40,2);writeln('| 1 | 2 | 3 | 4 | 5 | 6 |');

gotoxy(40,3);write('===============================');

Page 14: Makalah Algo

gotoxy(40,4);writeln('| 7 | 8 | 9 | 10 | 11 | 12 |');

gotoxy(40,5);write('===============================');

gotoxy(40,6);writeln('| 13 | 14 | 15 | 16 | 17 | 18 |');

gotoxy(40,7);write('===============================');

gotoxy(40,8);writeln('| 19 | 20 | 21 | 22 | 23 | 24 |');

gotoxy(40,9);write('===============================');

end;

PROCEDURE DATA_1;

var no_krsi:integer;

tanya:char;

begin

gotoxy(45,12);

writeln('KETERANGAN : ');

gotoxy(50,13);

writeln('- Warna Merah : " TERISI" ');

gotoxy(40,1);write('===============================');

gotoxy(40,2);writeln('| 1 | 2 | 3 | 4 | 5 | 6 |');

gotoxy(40,3);write('===============================');

gotoxy(40,4);writeln('| 7 | 8 | 9 | 10 | 11 | 12 |');

gotoxy(40,5);write('===============================');

gotoxy(40,6);writeln('| 13 | 14 | 15 | 16 | 17 | 18 |');

gotoxy(40,7);write('===============================');

Page 15: Makalah Algo

gotoxy(40,8);writeln('| 19 | 20 | 21 | 22 | 23 | 24 |');

gotoxy(40,9);write('===============================');

gotoxy(1,8);write('Masukkan no_krsi ke-1 =');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

Page 16: Makalah Algo

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

Page 17: Makalah Algo

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

Page 18: Makalah Algo

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

Page 19: Makalah Algo

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

Page 20: Makalah Algo

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

Page 21: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_2;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-2 = ');readln(no_krsi);

case no_krsi of

Page 22: Makalah Algo

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

Page 23: Makalah Algo

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

Page 24: Makalah Algo

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

Page 25: Makalah Algo

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

Page 26: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

Page 27: Makalah Algo

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

Page 28: Makalah Algo

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_3;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-3 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

Page 29: Makalah Algo

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

Page 30: Makalah Algo

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

Page 31: Makalah Algo

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

Page 32: Makalah Algo

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

Page 33: Makalah Algo

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

Page 34: Makalah Algo

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

Page 35: Makalah Algo

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_4;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-4 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

Page 36: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

Page 37: Makalah Algo

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

Page 38: Makalah Algo

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

Page 39: Makalah Algo

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

Page 40: Makalah Algo

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

Page 41: Makalah Algo

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

Page 42: Makalah Algo

end;

end;

PROCEDURE DATA_5;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-5 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

Page 43: Makalah Algo

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

Page 44: Makalah Algo

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

Page 45: Makalah Algo

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

Page 46: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

Page 47: Makalah Algo

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

Page 48: Makalah Algo

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

Page 49: Makalah Algo

PROCEDURE DATA_6;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-6 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

Page 50: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

Page 51: Makalah Algo

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

Page 52: Makalah Algo

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

Page 53: Makalah Algo

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

Page 54: Makalah Algo

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

Page 55: Makalah Algo

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_7;

Page 56: Makalah Algo

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-7 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

Page 57: Makalah Algo

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

Page 58: Makalah Algo

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

Page 59: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

Page 60: Makalah Algo

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

Page 61: Makalah Algo

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

Page 62: Makalah Algo

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_8;

var no_krsi:integer;

tanya:char;

begin

Page 63: Makalah Algo

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-8 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

Page 64: Makalah Algo

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

Page 65: Makalah Algo

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

Page 66: Makalah Algo

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

Page 67: Makalah Algo

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

Page 68: Makalah Algo

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

Page 69: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_9;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

Page 70: Makalah Algo

gotoxy(1,8);write('Masukkan no_krsi ke-9 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

Page 71: Makalah Algo

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

Page 72: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

Page 73: Makalah Algo

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

Page 74: Makalah Algo

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

Page 75: Makalah Algo

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

Page 76: Makalah Algo

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_10;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-10 = ');readln(no_krsi);

case no_krsi of

Page 77: Makalah Algo

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

Page 78: Makalah Algo

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

Page 79: Makalah Algo

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

Page 80: Makalah Algo

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

Page 81: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

Page 82: Makalah Algo

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

Page 83: Makalah Algo

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_11;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-11 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

Page 84: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

Page 85: Makalah Algo

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

Page 86: Makalah Algo

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

Page 87: Makalah Algo

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

Page 88: Makalah Algo

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

Page 89: Makalah Algo

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

Page 90: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_12;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-12 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

Page 91: Makalah Algo

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

Page 92: Makalah Algo

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

Page 93: Makalah Algo

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

Page 94: Makalah Algo

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

Page 95: Makalah Algo

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

Page 96: Makalah Algo

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

Page 97: Makalah Algo

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_13;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-13 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

Page 98: Makalah Algo

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

Page 99: Makalah Algo

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

Page 100: Makalah Algo

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

Page 101: Makalah Algo

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

Page 102: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

Page 103: Makalah Algo

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

Page 104: Makalah Algo

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_14;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-14 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

Page 105: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

Page 106: Makalah Algo

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

Page 107: Makalah Algo

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

Page 108: Makalah Algo

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

Page 109: Makalah Algo

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

Page 110: Makalah Algo

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

Page 111: Makalah Algo

end;

end;

PROCEDURE DATA_15;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-15 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

Page 112: Makalah Algo

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

Page 113: Makalah Algo

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

Page 114: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

Page 115: Makalah Algo

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

Page 116: Makalah Algo

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

Page 117: Makalah Algo

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

Page 118: Makalah Algo

PROCEDURE DATA_16;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-16 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

Page 119: Makalah Algo

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

Page 120: Makalah Algo

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

Page 121: Makalah Algo

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

Page 122: Makalah Algo

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

Page 123: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

Page 124: Makalah Algo

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

Page 125: Makalah Algo

PROCEDURE DATA_17;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-17 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

Page 126: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

Page 127: Makalah Algo

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

Page 128: Makalah Algo

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

Page 129: Makalah Algo

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

Page 130: Makalah Algo

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

Page 131: Makalah Algo

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_18;

Page 132: Makalah Algo

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-18 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

Page 133: Makalah Algo

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

Page 134: Makalah Algo

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

Page 135: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

Page 136: Makalah Algo

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

Page 137: Makalah Algo

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

Page 138: Makalah Algo

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_19;

var no_krsi:integer;

tanya:char;

Page 139: Makalah Algo

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-19 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

Page 140: Makalah Algo

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

Page 141: Makalah Algo

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

Page 142: Makalah Algo

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

Page 143: Makalah Algo

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

Page 144: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

Page 145: Makalah Algo

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_20;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

Page 146: Makalah Algo

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-20 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

Page 147: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

Page 148: Makalah Algo

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

Page 149: Makalah Algo

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

Page 150: Makalah Algo

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

Page 151: Makalah Algo

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

Page 152: Makalah Algo

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_21;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-21 = ');readln(no_krsi);

Page 153: Makalah Algo

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

Page 154: Makalah Algo

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

Page 155: Makalah Algo

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

Page 156: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

Page 157: Makalah Algo

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

Page 158: Makalah Algo

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

Page 159: Makalah Algo

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_22;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-22 = ');readln(no_krsi);

case no_krsi of

1: begin

Page 160: Makalah Algo

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

Page 161: Makalah Algo

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

Page 162: Makalah Algo

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

Page 163: Makalah Algo

write('12');

end;

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

Page 164: Makalah Algo

textcolor(white+blink);

write('16');

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

Page 165: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

Page 166: Makalah Algo

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_23;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-23 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

Page 167: Makalah Algo

textcolor(white+blink);

write('1');

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

Page 168: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

Page 169: Makalah Algo

gotoxy(53,4);

textcolor(white+blink);

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

Page 170: Makalah Algo

13: begin

gotoxy(42,6);

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

Page 171: Makalah Algo

end;

17: begin

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

Page 172: Makalah Algo

write('20');

end;

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

Page 173: Makalah Algo

textcolor(white+blink);

write('24');

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

PROCEDURE DATA_24;

var no_krsi:integer;

tanya:char;

begin

textcolor(14);

textbackground(black);

gotoxy(1,8);write('Masukkan no_krsi ke-24 = ');readln(no_krsi);

case no_krsi of

1: begin

gotoxy(42,2);

textbackground(red);

textcolor(white+blink);

write('1');

Page 174: Makalah Algo

end;

2: begin

gotoxy(48,2);

textbackground(red);

textcolor(white+blink);

write('2');

end;

3: begin

gotoxy(53,2);

textbackground(red);

textcolor(white+blink);

write('3');

end;

4: begin

gotoxy(58,2);

textbackground(red);

textcolor(white+blink);

write('4');

end;

5: begin

gotoxy(63,2);

textbackground(red);

textcolor(white+blink);

Page 175: Makalah Algo

write('5');

end;

6: begin

gotoxy(68,2);

textbackground(red);

textcolor(white+blink);

write('6');

end;

7: begin

gotoxy(42,4);

textbackground(red);

textcolor(white+blink);

write('7');

end;

8: begin

gotoxy(48,4);

textbackground(red);

textcolor(white+blink);

write('8');

end;

9: begin

gotoxy(53,4);

textcolor(white+blink);

Page 176: Makalah Algo

textbackground(red);

write('9');

end;

10: begin

gotoxy(57,4);

textbackground(red);

textcolor(white+blink);

write('10');

end;

11: begin

gotoxy(62,4);

textbackground(red);

textcolor(white+blink);

write('11');

end;

12: begin

gotoxy(67,4);

textbackground(red);

textcolor(white+blink);

write('12');

end;

13: begin

gotoxy(42,6);

Page 177: Makalah Algo

textbackground(red);

textcolor(white+blink);

write('13');

end;

14: begin

gotoxy(47,6);

textbackground(red);

textcolor(white+blink);

write('14');

end;

15: begin

gotoxy(52,6);

textbackground(red);

textcolor(white+blink);

write('15');

end;

16: begin

gotoxy(57,6);

textbackground(red);

textcolor(white+blink);

write('16');

end;

17: begin

Page 178: Makalah Algo

gotoxy(62,6);

textbackground(red);

textcolor(white+blink);

write('17');

end;

18: begin

gotoxy(67,6);

textbackground(red);

textcolor(white+blink);

write('18');

end;

19: begin

gotoxy(42,8);

textbackground(red);

textcolor(white+blink);

write('19');

end;

20: begin

gotoxy(47,8);

textbackground(red);

textcolor(white+blink);

write('20');

end;

Page 179: Makalah Algo

21: begin

gotoxy(52,8);

textbackground(red);

textcolor(white+blink);

write('21');

end;

22: begin

gotoxy(57,8);

textbackground(red);

textcolor(white+blink);

write('22');

end;

23: begin

gotoxy(62,8);

textbackground(red);

textcolor(white+blink);

write('23');

end;

24: begin

gotoxy(67,8);

textbackground(red);

textcolor(white+blink);

write('24');

Page 180: Makalah Algo

end;

else

writeln('Pilihan tidak tersedia...');

end;

end;

{ -- PROGRAM UTAMA --}

BEGIN

textbackground(black);

CLRSCR;

ULANG := 'Y';

WHILE (ULANG='Y') OR (ULANG='y') DO

BEGIN

CLRSCR;

GARIS;

gotoxy(1,7);write('masukkan jumlah kursi : '); readln(jum);

if (jum=1) then

begin

DATA_1;

end

else if (jum=2) then

begin

Page 181: Makalah Algo

DATA_1;

DATA_2;

end

else if (jum=3) then

begin

DATA_1;

DATA_2;

DATA_3;

end

else if (jum=4) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

end

else if (jum=5) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

Page 182: Makalah Algo

end

else if (jum=6) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

end

else if (jum=7) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

end

else if (jum=8) then

begin

DATA_1;

Page 183: Makalah Algo

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

end

else if (jum=9) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

end

else if (jum=10) then

begin

DATA_1;

Page 184: Makalah Algo

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

end

else if (jum=11) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

Page 185: Makalah Algo

end

else if (jum=12) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

end

else if (jum=13) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

Page 186: Makalah Algo

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

end

else if (jum=14) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

Page 187: Makalah Algo

DATA_13;

DATA_14;

end

else if (jum=15) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

end

else if (jum=16) then

begin

Page 188: Makalah Algo

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

end

else if (jum=17) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

Page 189: Makalah Algo

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

end

else if (jum=18) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

Page 190: Makalah Algo

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

end

else if (jum=19) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

Page 191: Makalah Algo

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

end

else if (jum=20) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

Page 192: Makalah Algo

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

DATA_20;

end

else if (jum=21) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

Page 193: Makalah Algo

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

DATA_20;

DATA_21;

end

else if (jum=22) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

Page 194: Makalah Algo

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

DATA_20;

DATA_21;

DATA_22;

end

else if (jum=23) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

DATA_5;

DATA_6;

DATA_7;

Page 195: Makalah Algo

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

DATA_20;

DATA_21;

DATA_22;

DATA_23;

end

else if (jum=24) then

begin

DATA_1;

DATA_2;

DATA_3;

DATA_4;

Page 196: Makalah Algo

DATA_5;

DATA_6;

DATA_7;

DATA_8;

DATA_9;

DATA_10;

DATA_11;

DATA_12;

DATA_13;

DATA_14;

DATA_15;

DATA_16;

DATA_17;

DATA_18;

DATA_19;

DATA_20;

DATA_21;

DATA_22;

DATA_23;

DATA_24;

end

else

begin

Page 197: Makalah Algo

gotoxy(15,20); write('maaf kursi yang tersedia hanya sampai 24 kursi');

end;

textbackground(black);

textcolor(14);

readln;

GOTOXY(2,10); WRITE('ULANG [Y/T] =');READLN(ULANG);

END; {END WHILE}

END.

Page 198: Makalah Algo

KESIMPULAN dan SARAN

KESIMPULAN

Program ini dibuat sedemikian rupa untuk mempermudah dalam pemesanan tiket bus. dengan itu kita dapat memberikan pelayanan yang memuaskan kepada customer.

SARAN

Program ini masih perlu di diperbaiki, karena masih banyak kekurangan dan kurang simpel dan kurang efisien, karena terlalu banyak data yang dimasukan.