You are on page 1of 2

PROGRAM KELIPATANBILANGAN ;

uses wincrt ;

var
s , upper : real;
i: real ;

Begin
clrscr ;
read ( s, upper) ;
i:= s;
do
read (i) ;
i := i + upper
while (i <= upper );
end.

PROGRAM segitiga ;

uses wincrt ;

var
a , t, luas : real;

Begin
clrscr ;
write ( 'masukkan alas :') ; read (a);
write ('masukkan tinggi :'); read (t);
luas := 1/2 * a * t ;
write (luas);
end.

PROGRAM balok ;

uses wincrt ;

var
p, l, t, luas, volume : real;

Begin
clrscr ;
write ('masukkan panjang:');read (p);
write ('masukkan tinggi:');read (t);
write ('masukkan lebar :');read (l);
luas :=(2*p*l)+(2*t*p)+(2*l*t);
write ('luas=',luas:5:0);

volume := p*l*t ;
write ('volume=',volume:5:0);

end.
PROGRAM segitiga ;

uses wincrt ;

var
a , t, luas : real;

Begin
clrscr ;
write ( 'masukkan alas :') ; read (a);
write ('masukkan tinggi :'); read (t);
luas := 1/2 * a * t ;
write ('luas=', luas:5:0);
end.

PROGRAM REAMUR_FAHRENHEIT ;

uses wincrt ;

var
a,b,c : REAL ;
Begin
clrscr ;
write (' masukkan angka c=');read (c);
write (' masukkan angka a=');read (a);
write (' masukkan angka b=');read (b);
c := SQRT (a*a)+(b*b);
write ('c=', c:8:0);
a := SQRT (c*c)-(b*b);
write ('a=', a:8:0);
b := SQRT (c*c)-(a*a);
write ('b=', b:8:0);
end.

You might also like