Powered By Blogger

Kamis, 31 Desember 2009

program function jumlah

program m9c1;
uses wincrt;
function hitung (var a, b, c, d: integer): integer;
begin
hitung := a+b;
c := a*b;
d := a-b;
end;
var
x, y, z, w : integer;
begin
write ('Nilai x? ');
readln (x);
write ('NIlai y? ');
readln (y);
writeln;
writeln (x, '+', y, '= ',hitung (x,y,z,w));
writeln (x, 'x', y, '=', z);
writeln (x, '-', y, '=',w);
end.

Tidak ada komentar:

Posting Komentar