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.
Kamis, 01 Desember 2011
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.
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.
Senin, 21 November 2011
Latihan PraUTS
buat temen-temen kelas C dan D yang butuh soal latihan PraUTSnya bisa latihan pake soal dibawah ini, mungkin mirip geto sama soal UTSnya..Coba pelajari ajja yach,,ingettt Kerjaennya jangan pake acara nyontek yaaa,,, and beljara disiplin dalam waktu biar pas UTS kaliand pada bisa,,,SEmangaaathh yooo,..
GOOD Luck buat kaleandddd,,,Jawaban soal ini saya posting besok kaloo udah selesai kalian ujian praktikum...!!! ^_^
GOOD Luck buat kaleandddd,,,Jawaban soal ini saya posting besok kaloo udah selesai kalian ujian praktikum...!!! ^_^
A. Buatlah sebuah program Perhitungan Gaji Karyawan dengan ketentuan berikut :
a. User memasukkan data pegawai berupa : NIP, Nama Pegawai, Golongan, Jumlah Anak.
b. Gaji Pokok pegawai ditentukan sebagai berikut :
Golongan | Gaji Pokok |
IA | 1500000 |
IB | 1600000 |
IIA | 1800000 |
IIB | 1900000 |
IIIA | 2100000 |
IIIB | 2400000 |
IVA | 3500000 |
c. Jika pegawai sudah menikah dan memiliki anak >= 2 maka tunjangan anak := 15%*Gaji Pokok, jika tidak maka tunjangan anak tidak diberikan.
d. Gaji Bersih dihitung dengan rumus : Gaji Bersih := Gaji Pokok + Tunjangan Anak
e. Output program berupa : Nama Pegawai, NIP, Golongan,Status, Jumlah anak, Tunjangan anak, Gaji pokok, Gaji Bersih.
B. Buatlah program untuk mencetak gaji karyawan dimana:
Inputan : nik,nama,jabatan (direktur,manager,karyawan,OB)
Ketentuan:
Jabatan Gaji Tunjangan
Direktur 3000000 10 % dari gaji
Manager 2000000 5% dari gaji
Karyawan 1000000 2% dari gaji
OB 800000 1% dari gaji
Direktur 3000000 10 % dari gaji
Manager 2000000 5% dari gaji
Karyawan 1000000 2% dari gaji
OB 800000 1% dari gaji
Dikenakan PPN 10 % dari gaji
Gaji Bersih didapat dari : gaji + tunjangan – PPn
Gaji Bersih didapat dari : gaji + tunjangan – PPn
Output : Nik,nama,jabatan,gaji awal,tunjangan,PPN,total gaji.
C. Buatlah program kasir dimana :
Input : Nama kasir,Kode barang,Nama barang,harga satuan,jumlah barang.
Proses:
Harga_beli := harga_satuan * jumlah
Jika harga_beli >= 20000, maka diskon 10% * harga_beli, total_bayar := harga_beli – diskon.
Output : Nama kasir,kode barang, nama barang, harga satuan, jumlah barang, diskon.
D. Buatlah program program menghitung grade mahasiswa dimana:
Jika na >=90 grade A
Jika na >=80 grade B+
Jika na >=70 grade B
Jika na >=60 grade C+
Jika na >=50 grade C
Jika na >=40 grade D
Jika na <=39 grade E
Rumus na:= 20% * Harian + 30% * UTS + 50% * UAS
Output Nim,Nama,Jurusan,Semester,Nilai harian,Nilai UTS,Nilai UAS,Nilai akhir
E. Berikut adalah data pengolahan gaji karyawan;
· Nomor Induk Karyawan
· Nama Karyawan
· Status
· Jumlah Anak
· Jabatan
· Gaji Pokok
· Tunjangan Istri
· Tunjangan Anak
· Tunjangan jabatan
· Jamsostek
· Pajak
· Gaji Bersih
Catatan;
Tunjangan istri
Tunjangan istri
· jika status 'menikah' maka tunjangan istri 10 persen dari gaji pokok
· Selain itu tidak dapat tunjangan
Tunjangan anak
· Jika jumlah anak kurang atau sama dengan 3 orang, tunjangan anak 5 persen dari gaji pokok untuk masing-masing anak
· Jika jumlah anak lebih dari 3, tunjangan anak maksimal untuk 3 orang anak.
· selain itu tidak dapat tunjangan
Tunjangan jabatan, dan GAPOK
· Jika jabatan 'manager' maka tunjangan jabatan Rp. 2000000, Gapok : 3500000
· Jika jabatan 'Supervisor' maka tunjangan jabatan Rp. 1500000, Gapok : 2500000
· Jika jabatan 'Mandor' maka tunjangan jabatan Rp. 1000000 , Gapok : 1500000
· Selain itu tidak ada tunjangan
Pajak 2,5% dari gaji pokok
Jamsostek 10 % dari Gaji pokok
Gaji bersih = (gaji pokok + akumulasi tunjangan)-(pajak+jamsostek)
.
Rabu, 02 November 2011
jawaban KUIS C
heeyyy kelas C...
ini jawaban kuis kalian...soalnya gampang tapi kenapa bnyak yang belomm bisa...hmmmm
parahnya lagi ada yang COPAS....nget belajar UTS sebentar lagi...
program gaji_pegawai;
uses
winCrt;
var
nm,gol :string;
ank,nip : integer;
gapok,tunjangan,gaji_brsh :real;
begin
gotoxy(12,2);writeln('MENCETAK GAJI PEGAWAI');
gotoxy(12,3);writeln('=====================');
writeln;
write('NIP : ');readln(nip);
write('Nama Pegawai : ');readln(nm);
write('Golongan : ');readln(gol);
write('Jumlah anak : ');readln(ank);
if gol ='IA' then
gapok := 1500000 else
if gol ='IIA' then
gapok:= 2500000 else
if gol ='IIIA' then
gapok:= 3500000 else
if gol ='IVA' then
gapok:= 4500000;
if ank >= 2 then
begin
tunjangan:= (0.10 * gapok);
gaji_brsh:= (gapok + tunjangan);
end
else
begin
tunjangan:= 0;
gaji_brsh:=gapok;
end;
clrscr;
begin
writeln('DATA GAJI KARYAWAN');
writeln('------------------');
writeln('NIP : ',nip);
writeln('Nama Pegawai : ',nm);
writeln('Golongan : ',gol);
writeln('Jumlah anak : ',ank);
writeln('Tunjangan : ',tunjangan:6:0);
writeln('Gaji Pokok : ',gapok:6:0);
writeln('Gaji Bersih : ',gaji_brsh:6:0);
end;
end.
ini jawaban kuis kalian...soalnya gampang tapi kenapa bnyak yang belomm bisa...hmmmm
parahnya lagi ada yang COPAS....nget belajar UTS sebentar lagi...
program gaji_pegawai;
uses
winCrt;
var
nm,gol :string;
ank,nip : integer;
gapok,tunjangan,gaji_brsh :real;
begin
gotoxy(12,2);writeln('MENCETAK GAJI PEGAWAI');
gotoxy(12,3);writeln('=====================');
writeln;
write('NIP : ');readln(nip);
write('Nama Pegawai : ');readln(nm);
write('Golongan : ');readln(gol);
write('Jumlah anak : ');readln(ank);
if gol ='IA' then
gapok := 1500000 else
if gol ='IIA' then
gapok:= 2500000 else
if gol ='IIIA' then
gapok:= 3500000 else
if gol ='IVA' then
gapok:= 4500000;
if ank >= 2 then
begin
tunjangan:= (0.10 * gapok);
gaji_brsh:= (gapok + tunjangan);
end
else
begin
tunjangan:= 0;
gaji_brsh:=gapok;
end;
clrscr;
begin
writeln('DATA GAJI KARYAWAN');
writeln('------------------');
writeln('NIP : ',nip);
writeln('Nama Pegawai : ',nm);
writeln('Golongan : ',gol);
writeln('Jumlah anak : ',ank);
writeln('Tunjangan : ',tunjangan:6:0);
writeln('Gaji Pokok : ',gapok:6:0);
writeln('Gaji Bersih : ',gaji_brsh:6:0);
end;
end.
jawaban KUIS D
nie jawaban hasil kuis buat temen2 kelompok D...masakkkk soal kayak begini di bilang sulit...
yang penting mau usaha semuanya pasti bisa,,soalnya gampang,,heeee
bisa kalian liat sendiri jawabanya di bawah nie,,,!!!
moga bisa bermanfaat yach...ingett belajarrrr sebentarrr lagi UTS...!!!
program Gaji;
uses
winCrt;
var
gp,gb,pjk,js,tis,ta,tjb:real;
nik:string[10];
nk:string[27];
sts:string[9];
jb:string[15];
ja:byte;
begin
gotoxy (12,3);writeln('PROGRAM PENCETAKAN GAJI KARYAWAN');
gotoxy (12,4);writeln('________________________________');
gotoxy (12,6);writeln('## MASUKKAN DATA KARYAWAN ##');
writeln;
write('Nomor Induk Karyawan = '); readln(nik);
write('Nama Karyawan = '); readln(nk);
write('Status = '); readln(sts);
write('Jumlah Anak = '); readln(ja);
write('Jabatan = '); readln(jb);
clrscr;
if jb='manager' then
begin
gp := 3500000;
tjb:= 2000000;
end
else
if jb='supervisor' then
begin
gp := 2500000;
tjb:= 1500000;
end
else
if jb='mandor' then
begin
gp := 1500000;
tjb:= 1000000;
end
else
begin
tjb:=0;
end;
if sts='menikah' then
begin
tis:=0.1*gp;
end
else
begin
tis:=0;
end;
if ja<=3 then
begin
ta:=0.05*gp*ja;
end
else
if ja>3 then
begin
ta:=0.05*gp*3;
end
else
begin
ta:=0;
end;
pjk:=0.025*gp;
js:=0.01*gp;
gb:=(gp+tis+ta+tjb)-(pjk+js);
gotoxy (12,3);writeln('DATA GAJI KARYAWAN');
gotoxy (12,4);writeln('==================');
writeln;
writeln('Tunjangan Istri : Rp. ', tis:9:0);
writeln('Tunjangan Anak : Rp. ', ta:9:0);
writeln('Tunjangan Jabatan : Rp. ', tjb:9:0);
Writeln('Pajak : Rp. ', pjk:9:0);
writeln('Jamsostek : Rp. ', js:9:0);
writeln('Gaji Bersih : Rp. ', gb:9:0);
end.
yang penting mau usaha semuanya pasti bisa,,soalnya gampang,,heeee
bisa kalian liat sendiri jawabanya di bawah nie,,,!!!
moga bisa bermanfaat yach...ingett belajarrrr sebentarrr lagi UTS...!!!
program Gaji;
uses
winCrt;
var
gp,gb,pjk,js,tis,ta,tjb:real;
nik:string[10];
nk:string[27];
sts:string[9];
jb:string[15];
ja:byte;
begin
gotoxy (12,3);writeln('PROGRAM PENCETAKAN GAJI KARYAWAN');
gotoxy (12,4);writeln('________________________________');
gotoxy (12,6);writeln('## MASUKKAN DATA KARYAWAN ##');
writeln;
write('Nomor Induk Karyawan = '); readln(nik);
write('Nama Karyawan = '); readln(nk);
write('Status = '); readln(sts);
write('Jumlah Anak = '); readln(ja);
write('Jabatan = '); readln(jb);
clrscr;
if jb='manager' then
begin
gp := 3500000;
tjb:= 2000000;
end
else
if jb='supervisor' then
begin
gp := 2500000;
tjb:= 1500000;
end
else
if jb='mandor' then
begin
gp := 1500000;
tjb:= 1000000;
end
else
begin
tjb:=0;
end;
if sts='menikah' then
begin
tis:=0.1*gp;
end
else
begin
tis:=0;
end;
if ja<=3 then
begin
ta:=0.05*gp*ja;
end
else
if ja>3 then
begin
ta:=0.05*gp*3;
end
else
begin
ta:=0;
end;
pjk:=0.025*gp;
js:=0.01*gp;
gb:=(gp+tis+ta+tjb)-(pjk+js);
gotoxy (12,3);writeln('DATA GAJI KARYAWAN');
gotoxy (12,4);writeln('==================');
writeln;
writeln('Tunjangan Istri : Rp. ', tis:9:0);
writeln('Tunjangan Anak : Rp. ', ta:9:0);
writeln('Tunjangan Jabatan : Rp. ', tjb:9:0);
Writeln('Pajak : Rp. ', pjk:9:0);
writeln('Jamsostek : Rp. ', js:9:0);
writeln('Gaji Bersih : Rp. ', gb:9:0);
end.
Selasa, 25 Oktober 2011
Case Bulan
program case_of;
uses
wincrt;
var
bulan:byte;
begin
writeln ('Program Mencetak Nama Bulan');
writeln('____________________________');
write('Masukkan no Bulan[1..8] : ');readln(bulan);
case bulan of
1:writeln ('Januari');
2:writeln ('Februari');
3:writeln ('Maret');
4:writeln ('April');
5:writeln ('Mei');
6:writeln ('juni');
7:writeln ('Juli');
8:writeln ('Agustus');
else
writeln('Nama Gak Ada');
end;
end.
uses
wincrt;
var
bulan:byte;
begin
writeln ('Program Mencetak Nama Bulan');
writeln('____________________________');
write('Masukkan no Bulan[1..8] : ');readln(bulan);
case bulan of
1:writeln ('Januari');
2:writeln ('Februari');
3:writeln ('Maret');
4:writeln ('April');
5:writeln ('Mei');
6:writeln ('juni');
7:writeln ('Juli');
8:writeln ('Agustus');
else
writeln('Nama Gak Ada');
end;
end.
IF and Looping
program kondisi_if;
uses
wincrt;
var
nilai:integer;
ket,ucapan:string;
ulang:char;
begin
ulang:='Y';
while (ulang='Y') or (ulang='y') do
begin
writeln('Program Kondisi IF');
writeln('------------------');
write('Masukkan sebuah Nilai : ');readln(nilai);
if nilai >= 60 then
begin
ket:='LULUS';
ucapan:='Selamat Yaaaa';
end else
begin
ket:='GAGAL';
ucapan:='SABAR YAAAA';
end;
writeln;
writeln('Nilai Anda ',nilai,' maka ',ket);
writeln('Kami Mengucapkan ',ucapan);
writeln('-------------------------------');
write('Mau Coba Lagi?[Y/T] : ');readln(ulang);
clrscr;
end;
writeln('TERIMA KASIH');
end.
uses
wincrt;
var
nilai:integer;
ket,ucapan:string;
ulang:char;
begin
ulang:='Y';
while (ulang='Y') or (ulang='y') do
begin
writeln('Program Kondisi IF');
writeln('------------------');
write('Masukkan sebuah Nilai : ');readln(nilai);
if nilai >= 60 then
begin
ket:='LULUS';
ucapan:='Selamat Yaaaa';
end else
begin
ket:='GAGAL';
ucapan:='SABAR YAAAA';
end;
writeln;
writeln('Nilai Anda ',nilai,' maka ',ket);
writeln('Kami Mengucapkan ',ucapan);
writeln('-------------------------------');
write('Mau Coba Lagi?[Y/T] : ');readln(ulang);
clrscr;
end;
writeln('TERIMA KASIH');
end.
If-then-Else
program kondisi_if;
uses
wincrt;
var
nilai:integer;
begin
writeln('Program kondisi IF');
writeln('__________________');
write('Masukkan Sebuah Nilai : ');readln(nilai);
if nilai >= 60 then
writeln ('Lulus')
else
writeln('Gagal');
end.
uses
wincrt;
var
nilai:integer;
begin
writeln('Program kondisi IF');
writeln('__________________');
write('Masukkan Sebuah Nilai : ');readln(nilai);
if nilai >= 60 then
writeln ('Lulus')
else
writeln('Gagal');
end.
Case Bulan and Looping
program case_of;
uses
winCrt;
var
coba:char;
bulan:string;
indeks:byte;
begin
coba:='Y';
repeat
writeln('Program Mencetak Nama Bulan');
writeln('---------------------------');
write('Masukkan no Bulan[1..2] : ');readln(indeks);
case indeks of
1:bulan:='Januari';
2:bulan:='Februari';
else
bulan:='Gak Ada';
end;
writeln('Bulan ke ',indeks,' adalah ',bulan);
writeln('---------------------------');
write('Mau Coba Lagi?[Y/T] : ');readln(coba);
clrscr;
until (coba='T') or (coba='t');
writeln('TERIMA KASIH');
end.
uses
winCrt;
var
coba:char;
bulan:string;
indeks:byte;
begin
coba:='Y';
repeat
writeln('Program Mencetak Nama Bulan');
writeln('---------------------------');
write('Masukkan no Bulan[1..2] : ');readln(indeks);
case indeks of
1:bulan:='Januari';
2:bulan:='Februari';
else
bulan:='Gak Ada';
end;
writeln('Bulan ke ',indeks,' adalah ',bulan);
writeln('---------------------------');
write('Mau Coba Lagi?[Y/T] : ');readln(coba);
clrscr;
until (coba='T') or (coba='t');
writeln('TERIMA KASIH');
end.
Case ANgka
Program Angka;
uses
wincrt;
var
a:integer;
begin
write('Angka (1-3) = ');readln(a);
writeln;
case a of
1:write('Satu');
2:write('Dua');
3:write('Tiga');
else
write('Pilihan Salah!');
end;
end.
uses
wincrt;
var
a:integer;
begin
write('Angka (1-3) = ');readln(a);
writeln;
case a of
1:write('Satu');
2:write('Dua');
3:write('Tiga');
else
write('Pilihan Salah!');
end;
end.
Menentukan Segitiga
Program Menentukan_Segitiga;
Uses
Wincrt;
Var
A,B,C,X,Y:integer;
Begin
Writeln('Program Menentukan Segitiga');
Writeln('=========================');
Writeln;
Write('Masukkan Sisi A: ');readln(A);
Write('Masukkan Sisi B: ');readln(B);
Write('Masukkan Sisi C: ');readln(C);
Writeln;
X:=sqr(C);
Y:=sqr(A)+sqr(B);
if (X<Y) then
Writeln('Segitiga Lancip')
else
if (X=Y) then
Writeln('Segitiga Siku-Siku')
else
Writeln('Segitiga Tumpul')
End.
Uses
Wincrt;
Var
A,B,C,X,Y:integer;
Begin
Writeln('Program Menentukan Segitiga');
Writeln('=========================');
Writeln;
Write('Masukkan Sisi A: ');readln(A);
Write('Masukkan Sisi B: ');readln(B);
Write('Masukkan Sisi C: ');readln(C);
Writeln;
X:=sqr(C);
Y:=sqr(A)+sqr(B);
if (X<Y) then
Writeln('Segitiga Lancip')
else
if (X=Y) then
Writeln('Segitiga Siku-Siku')
else
Writeln('Segitiga Tumpul')
End.
Konversi Suhu
program konversi;
uses
wincrt;
procedure garis;
begin
writeln('-----------------------------------');
end;
procedure menu;
begin
writeln('PROGRAM KONVERSI SUHU');
end;
procedure exit;
begin
writeln('Keluar');
end;
procedure celrea(var R : integer);
var
C : real;
begin
C := 5 / 4 * R;
write('Konversi Celcius ke Reamur : ',C:3:0);
writeln;
end;
function Refa (var F: integer) : real;
begin
Refa:= 4 / 9 * F;
end;
function Reci(var C : integer): real;
begin
Reci := 4 / 5 * C;
end;
function Feci(var C : integer): real;
begin
Feci := (9 / 5 * C ) + 32;
end;
var
a: integer;
b: real;
ulang,pil: char;
begin
ulang:='Y';
while (ulang='Y') or (ulang='y') do
begin
garis;
menu;
garis;
writeln('[1]. KONVERSI CELCIUS KE REAMUR');
writeln('[2]. KONVERSI REAMUR KE FAHRENHEIT');
writeln('[3]. KONVERSI REAMUR KE CELCIUS');
writeln('[4]. KONVERSI FAHRENHEIT KE CELCIUS');
writeln('[5]. KELUAR');
garis;
write('Masukka Pilihan Anda : ');readln(pil);
garis;
clrscr;
case pil of
'1' : begin
writeln('KONVERSI CELCIUS KE REAMUR');
garis;
write('Masukkan Suhu Reamur : ');readln(a);
garis;
celrea(a);
end;
'2': begin
writeln('KONVERSI REAMUR KE FAHRENHEIT');
garis;
write('Masukkan Suhu Fahrebheit : ');readln(a);
garis;
writeln('Konversi Reamur ke Fahrenheit : ',refa(a):3:0);
end;
'3': begin
writeln('KONVERSI REAMUR KE CELCIUS');
garis;
write('Masukkan Suhu Celcius : ');readln(a);
garis;
writeln('Konversi Reamur ke Celcius : ',Reci(a):3:0);
garis;
end;
'4': begin
writeln('KONVERSI FAHRENHEIT KE CELCIUS');
garis;
write('Masukkan Suhu Celcius : ');readln(a);
garis;
writeln('Konversi Fahrenheit ke Celcius : ',Feci(a):3:0);
garis;
end;
'5': begin
exit;
writeln('KELUA');
end;
end;
garis;
writeln('Menu Yang Anda Masukkan Salah');
garis;
write('Mengulang Menu lagi [Y/T] : ');readln(ulang);
garis;
clrscr;
end;
garis;
writeln('Thanks For Using This Program ^_^');
writeln('wanty_manyun@yahoo.com');
garis;
end.
Langganan:
Postingan (Atom)
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...
-
Entity-Relationship Diagram (ERD), dari kata yang terakhir saja dibenak kita sudah muncul sebuah kata “Skema / sketsa” ataupun kata lai...