Rabu, 13 Januari 2016

Pascal Procedure

program satu;
uses wincrt;

var
 y, z, n : integer;

procedure pertama;
var
 x : integer;

begin
 x := y + z;
 writeln(x);
end;

procedure kedua(b, c : integer);

var
 a : integer;
begin
 a:= b - c;
 writeln(a);
end;

procedure ketiga(d, e, f : integer);
begin
 d:= e * f;
 writeln(d);
end;

begin
 write(' y= ');readln(y);
 write(' z= ');readln(z);
 pertama;
 kedua(y,z);
 ketiga(n,y,z);
end.

0 komentar:

Posting Komentar