Program Modularisasi dengan Pascal

Tuesday, March 29, 2011 7:29 AM by Computer and Programming
program modularisasi;
uses wincrt;
var x,x1,x2,x3,x5:integer;
    x4:real;

procedure tambah;
begin
x:=x1+x2;
writeln('hasil tambah=',x)
end;

procedure kurang;
begin
x5:=x1-x2;
writeln('hasil kurang=',x5);
end;

procedure kali;
begin
x3:=x1*x2;
writeln('hasil kali=',x3);
end;

procedure bagi;
begin
x4:=x1/x2;
writeln('hasil bagi=',x4:10:2);
end;

begin
writeln('masukkan x1=');readln(x1);
writeln('masukkan x2=');readln(x2);
tambah;
kali;
bagi;
kurang;
end.

0 Response to "Program Modularisasi dengan Pascal"

Post a Comment