Kamis, 01 Desember 2011

Jawaban MID Algo & Pemrog 1- Kel C

KANAN :
program Data_tamu;

uses
    wincrt;

var
   lma_inap        :byte;
   nm_tamu,jns_kmr : string;
   biaya,ttl_biaya :real;

begin
   
     gotoxy(12,3);writeln('Program Pengolahan Data Tamu');
     gotoxy(12,4);writeln('=============================');
     writeln;
     write('Nama Tamu        : ');readln(nm_tamu);
     writeln('==========================');
     writeln('Standar,Superior,Suite');
     writeln('==========================');
     write('Jenis Kamar      : ');readln(jns_kmr);
     write('Lama Menginap    : ');readln(lma_inap);
     clrscr;
   
     if (jns_kmr='Standar') or (jns_kmr='standar') then
        biaya := 375000
     else if (jns_kmr='Superior') or (jns_kmr='superior') then
        biaya := 500000
     else
        biaya := 750000;


     ttl_biaya := biaya * lma_inap;


     gotoxy(18,3);writeln('Hotel Tenang');
     gotoxy(9,4);writeln('=======^^^^^^^^^^^^^^^^=======');
     writeln;
     writeln('Nama Tamu             : ',nm_tamu);
     writeln('Jenis Kamar           : ',jns_kmr);
     writeln('Lama Menginap         : ',lma_inap,' Bulan');
     writeln('Biaya yang dibayar    :Rp.',ttl_biaya:10:0,',-');
     writeln('=====================================');
     writeln;
     gotoxy(12,13);writeln('Terima Kasih Atas Kunjungan Anda..!!');
     gotoxy(12,14);writeln('=====================================');
   
end.

KIRI :

program Data_pelanggan;

uses
    wincrt;

var
   lma_inap        :byte;
   nm_plgn,jns_cci : string;
   biaya,ttl_biaya :real;

begin

     gotoxy(12,3);writeln('Program Pengolahan Data Pencucian Mobil');
     gotoxy(12,4);writeln('=======================================');
     writeln;
     write('Nama Pelanggan        : ');readln(nm_plgn);
     writeln('==========================');
     writeln('Standar,Kilap,Salju');
     writeln('==========================');
     write('Jenis Cuci            : ');readln(jns_cci);
     clrscr;
   
     if (jns_cci='Standar') or (jns_cci='standar') then
        biaya := 35000
     else if (jns_cci='Kilap') or (jns_cci='kilap') then
        biaya := 50000
     else
        biaya := 75000;


     ttl_biaya := biaya + biaya * 0.1;


     gotoxy(17,3);writeln('Bengkel Tenang');
     gotoxy(9,4);writeln('=======^^^^^^^^^^^^^^^^=======');
     writeln;
     writeln('Nama Pelanggan        : ',nm_plgn);
     writeln('Jenis Cuci            : ',jns_cci);
     writeln('Biaya Cuci            :Rp. ',biaya:10:0,',-');
     writeln('Biaya Stelah Pajak    :Rp.',ttl_biaya:10:0,',-');
     writeln('=====================================');
     writeln;
     gotoxy(12,13);writeln('Terima Kasih Atas Kunjungan Anda..!!');
     gotoxy(12,14);writeln('=====================================');
   
end.

Jawaban MID Algo & Pemrog 1- Kel D

KANAN :
program Data_pengunjung;

uses
    wincrt;

var
   nope,wktu     :byte;
   game          : string;
   biaya,ttl_byr :real;

begin
    
     gotoxy(12,3);writeln('Program Pengolahan Data Pengunjung');
     gotoxy(12,4);writeln('==================================');
     writeln;
     write('No Pengunjung    : ');readln(nope);
     write('Lama Bermain     : ');readln(wktu);
     writeln('================================');
     writeln('Shooting,Racing,Fighting,Dancing');
     writeln('================================');
     write('Jenis Game       : ');readln(game);
     clrscr;
    
     if (game='Shooting') or (game='shooting') then
        biaya := 500
     else if (game='Racing') or (game='racing') then
        biaya := 700
     else if (game='Fighting') or (game='Fighting') then
        biaya := 650
     else
        biaya := 800;


     ttl_byr:= biaya * wktu;


     gotoxy(12,3);writeln('TIMEZONE MATARAM');
     gotoxy(9,4);writeln('===^^^^^^^^^^^^^^^^===');
     writeln;
     writeln('No Pengunjung         : ',nope);
     writeln('Jenis Permainan       : ',game);
     writeln('Lama Bermain          : ',wktu,' Menit');
     writeln('Biaya yang dibayar    :Rp.',ttl_byr:10:0,',-');
     writeln('=====================================');
     writeln;
     gotoxy(12,13);writeln('Terima Kasih Atas Kunjungan Anda..!!');
     gotoxy(12,14);writeln('=====================================');
    
end.


KIRI :

program Data_pengunjung;

uses
    wincrt;

var
   nope,jml:byte;
   menu : string;
   harga,ttl_harga :real;

begin
   
     gotoxy(12,3);writeln('Program Pengolahan Data Pengunjung');
     gotoxy(12,4);writeln('==================================');
     writeln;
     write('No Pembeli       : ');readln(nope);
     writeln('======================================');
     writeln('Kebab standar,Kebab gila,Burger,Hotdog');
     writeln('======================================');
     write('Jenis Menu       : ');readln(menu);
     write('Jumlah           : ');readln(jml);
     clrscr;
   
     if (menu='Kebab standar') or (menu='kebab standar') then
        harga := 11000
     else if (menu='Kebab gila') or (menu='Kebab gila') then
        harga := 10000
     else if (menu='Burger') or (menu='burger') then
        harga := 13000
     else
        harga := 12500;


     ttl_harga := harga * jml;


     gotoxy(12,3);writeln('Kebab Baba Rafi Karang Sukun');
     gotoxy(9,4);writeln('=======^^^^^^^^^^^^^^^^=======');
     writeln;
     writeln('No Pembeli            : ',nope);
     writeln('Menu                  : ',menu);
     writeln('Jumlah                : ',jml,' Buah');
     writeln('Total yang dibayar    :Rp.',ttl_harga:10:0,',-');
     writeln('=====================================');
     writeln;
     gotoxy(12,13);writeln('Terima Kasih Atas Kunjungan Anda..!!');
     gotoxy(12,14);writeln('=====================================');
   
end.

array data mahasiswa

program array_1Dimensi; uses  winCrt; var  nim,nm,smstr,mk,grade:array[1..4] of string;  nh,uts,uas:array[1..4] of integer;  na:array...