Jumat, 14 November 2008

Program Hitung Volume Kerucut

uses crt;
var
r,t : byte;
v : real;
begin
clrscr;
writeln('*** Program Hitung Volume Kerucut ***');
writeln;
writeln('Program untuk menghitung volume kerucut ');
writeln('*Rumus V = 1/3 * 3.14 * r^2 * t *');
writeln;
writeln;
writeln;
write('Masukkan jari-jari kerucut = ');
readln(r);
Write('Masukkan tinggi kerucut = ');
readln(t);
v := 1/3 * 3.14 * r * r * t;
writeln;
writeln;
writeln('Volume kerucut yang dimaksud = ', v:6:2,'***');
writeln;
writeln;
readln;
end.

Program Hitung Volume Bola

uses crt;
var
r : byte;
v : real;
begin
clrscr;
writeln('*** Program Hitung Volume Bola ***');
writeln;
writeln('Program untuk menghitung volume bola');
writeln('*Rumus V = 4/3 * 3.14 * r^3*');
writeln;
writeln;
writeln;
write('Masukkan jari-jari bola = ');
readln(r);
v := 4/3*3.14* r * r * r;
writeln;
writeln;
writeln('Volume bola yang dimaksud = ', v:6:2,'***');
writeln;
writeln;
readln;
end.

Program Hitung Volume Kubus

uses crt;
var
s : longint;
begin
clrscr;
writeln('*** Program Hitung Volume Kubus ***');
writeln;
writeln('Program untuk menghitung volume kubus');
writeln('*Rumus V = s x s x s *');
writeln;
writeln;
writeln;
write(' Masukkan besar sisi kubus = ');
readln(s);
writeln;
writeln;
writeln('Volume kubus yang dimaksud = ' , s*s*s,'***');
writeln;
writeln;
readln;
end.

Program Hitung Volume Limas

uses crt;
var
a,at,t : byte;
l,v : real;
begin
clrscr;
writeln('*** Program Hitung Volume Limas ***');
writeln;
writeln('Program untuk menghitung volume limas');
writeln('*Rumus V = 1/3 * luas alas * t ');
writeln;
writeln;
writeln;
write(' Masukkan alas limas = ');
readln(a);
Write(' Masukkan tinggi alas limas = ');
readln(at);
write(' Masukkan tinggi limas = ');
readln(t);
l := 1/2 * a * at;
v := 1/3 * l * t;
writeln;
writeln;
writeln('Volume limas yang dimaksud = ', v:6:2,'***');
writeln;
writeln;
readln;
end.

Program Hitung Volume Tabung

uses crt;
var
r, t : byte;
v : real;
begin
clrscr;
writeln('*** Program Hitung Volume Tabung ***');
writeln;
writeln('Program untuk menghitung volume tabung');
writeln('*Rumus V = 3.14 x r^2 x t *');
writeln;
writeln;
writeln;
write(' Masukkan besar jari-jari tabung = ');
readln(r);
write(' Masukkan besar tinggi tabung = ');
readln(t);
v := 3.14 * r * r * t;
writeln;
writeln;
writeln('Volume tabung yang dimaksud = ', v:6:2,'***');
writeln;
writeln;
readln;
end.