Monday, January 7, 2019

ASD 13 dan 14

ASD 13

program LatProsedur;
var
a,b,c:integer;
procedure masukan;
begin
     write('Masukkan nilai A: '); readln(a);
     write('Masukkan nilai B: '); readln(b);
end;

procedure hasil;
begin
     c:=a+b;
end;

begin
     masukan;
     hasil;
     writeln('Hasil a+b= ',c);
     readln;
end.

=========
ASD 14

program LatFungsi;
function jumlah(var a,b:integer): integer;
begin
     jumlah:=a+b;
end;
    var
    x,y:integer;
    begin
         write('Masukkan nilai x: '); readln(x);
         write('Masukkan nilai y: '); readln(y);
         writeln('Hasil x+y = ',jumlah(x,y));
         readln;

end.
Bitcoin Offers:
Free Bitcoin, Double Bitcoin, Bitcoin Investment, Bitcoin Trading



"Bitcoin and Forex are high risk business. We must join them smartly."

No comments:

Post a Comment