Adv 970 x 90

Program Menghitung Luas Bangun Datar Pada Turbo Pascal (TPW)

OVERDIV - Contoh Program Hitung Luas Bangun Datar menggunakan Turbo Pascal for Windows 1.5 (TPW 1.5)

Isi programnya adalah :
1. Menghitung Luas Persegi
2. Menghitung Luas Persegi Panjang
3. Menghitung Luas Segitiga
4. Menghitung Luas Lingkaran

Bagi yang belum punya TPW 1.5, silahkan download aplikasinya disini >>

BERIKUT CODING PROGRAMNYA :

program menghitung_luas_bangun_datar;
uses wincrt;
label menu;
var nomormenu:integer;
panjang,lebar,sisi,alas,tinggi,jari,luas:real;
begin menu:

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(21,3);writeln('PROGRAM RUMUS LUAS BANGUN DATAR MATEMATIKA');
gotoxy(31,4);writeln('--- Created by ---');
gotoxy(29,5);writeln('TRI JUNI MANGKU RAHARJO');
writeln('===============================================================================');
gotoxy(25,9);writeln('MENGHITUNG LUAS BANGUN DATAR');
gotoxy(25,11);writeln('1. Menghitung Luas Persegi');
gotoxy(25,12);writeln('2. Menghitung Luas Persegi Panjang');
gotoxy(25,13);writeln('3. Menghitung Luas Segitiga');
gotoxy(25,14);writeln('4. Menghitung Luas Lingkaran');
gotoxy(25,16);write('Masukan RUMUS Nomor 1/2/3/4 : ') ;

Case readkey of

'1' : begin

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(21,3);writeln('PROGRAM RUMUS LUAS BANGUN DATAR MATEMATIKA');
gotoxy(31,4);writeln('--- Created by ---');
gotoxy(29,5);writeln('TRI JUNI MANGKU RAHARJO');
writeln('===============================================================================');
gotoxy(29,8);writeln('1.Hitung Luas Persegi');
writeln('===============================================================================');
gotoxy(31,10);write('Sisi = ');readln(Sisi);
gotoxy(31,11);write('Sisi = ');readln(Sisi);
luas:=Sisi*Sisi;
gotoxy(31,13);writeln('Hasil = ',luas:3:2);
readln;
end;

'2' : begin

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(21,3);writeln('PROGRAM RUMUS LUAS BANGUN DATAR MATEMATIKA');
gotoxy(31,4);writeln('--- Created by ---');
gotoxy(29,5);writeln('TRI JUNI MANGKU RAHARJO');
writeln('===============================================================================');
gotoxy(29,8);writeln('2.Hitung Luas Persegi Panjang');
writeln('===============================================================================');
gotoxy(31,10);write('Panjang = ');readln(panjang);
gotoxy(31,11);write('Lebar = ');readln(lebar);
luas:=panjang*lebar;
gotoxy(31,13);writeln('Hasil = ',luas:3:2);readln;
end;

'3' : begin

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(21,3);writeln('PROGRAM RUMUS LUAS BANGUN DATAR MATEMATIKA');
gotoxy(31,4);writeln('--- Created by ---');
gotoxy(29,5);writeln('TRI JUNI MANGKU RAHARJO');
writeln('===============================================================================');
gotoxy(29,8);writeln('3.Hitung Luas Segitiga');
writeln('===============================================================================');
gotoxy(31,10);write('Alas = ');readln(Alas);
gotoxy(31,11);write('Tinggi = ');readln(Tinggi);
luas:=0.5*alas*tinggi;
gotoxy(31,13);writeln('Hasil = ',luas:3:2); readln;
end;

'4': begin

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(21,3);writeln('PROGRAM RUMUS LUAS BANGUN DATAR MATEMATIKA');
gotoxy(31,4);writeln('--- Created by ---');
gotoxy(29,5);writeln('TRI JUNI MANGKU RAHARJO');
writeln('===============================================================================');
gotoxy(29,8);writeln('4.Hitung Luas Lingkaran');
writeln('===============================================================================');
gotoxy(31,10);write('Jari = ');readln(Jari);
luas:=3.14*jari*jari;
gotoxy(31,12);write('Hasil = ',luas:3:2);readln;
end;

'5':begin

clrscr;
gotoxy(0,2);writeln('===============================================================================');
gotoxy(30,3);writeln('!!! SORRY, ERROR !!!');
writeln('===============================================================================');

end;

end;

readkey; goto menu;

end.


SCREENSHOT :


Program Menghitung Luas Bangun Datar Pada Turbo Pascal (TPW)


Semoga Bermanfaat :)

0 Response to "Program Menghitung Luas Bangun Datar Pada Turbo Pascal (TPW)"

Post a Comment

= > Jika ada salah kata / link error / masalah lainnya, silahkan komentar untuk saya perbaiki
= > Silahkan komentar, gunakan bahasa yang baik & sopan

Yuk komentar pakai Emoticon BBM
Arahkan kursor ke emoticon untuk melihat kode !

:a :b :c :d :e :f :g :h :i :j :k :l :m :n :o :p :q :r :s :t :u :v :w :x :y :z =a =b =c =d =e =f =g =h =i =j =k =l =m =n =o =p =q =r