CONTOH PROGRAM
Program luas_segitiga;
Uses wincrt;
Var
luas: real;
a: integer;
t: integer;
begin
clrscr;
write ('alas= ');
readln (a);
writeln;
write ('tinggi= ');
readln (t);
writeln;
luas:=a*t/2;
write ('luas segitiga= ',luas: 4: 2);
end.
Uses wincrt;
Var
luas: real;
a: integer;
t: integer;
begin
clrscr;
write ('alas= ');
readln (a);
writeln;
write ('tinggi= ');
readln (t);
writeln;
luas:=a*t/2;
write ('luas segitiga= ',luas: 4: 2);
end.
0 komentar:
Posting Komentar