Monday, January 7, 2019

ASD 3

ASD 3
program Tambah;
     Var
     X: integer;
     Y: integer;
     Z: integer;
Begin
     Writeln('X: ');
     Readln(X);

     Writeln('Y: ');
     Readln(Y);

     Z:=X+Y;
     Writeln('X+Y= ',Z);
     Readln;

end.

==========
ASD 3a
program LebihDari;
Var
   Nilai: real;
begin
     Write('Ketik nilai: ');
     Readln(nilai);

     If nilai > 70 then
        Writeln('Lulus')
     else
         Writeln('Gagal');
     Readln;
end.

=========

ASD 3B
program Math;
var
   a,b:integer;
   add,min,times,divide:real;
begin
     write('Input number for A:'); read(a);
    writeln;
    write('Input number for B:'); read(b);
     add:=a+b;
     min:=a-b;
     times:=a*b;
     divide:=a/b;
     writeln;
     writeln('A+B=', add:2:0);
     writeln;
     writeln('A-B=', min:3:0);
     writeln;
     writeln('AxB=', times:2:0);
     writeln;
     writeln('A:B=', divide:2:0);
readln;
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