program lat10;
uses wincrt;
var a,b,c:real;
begin
writeln('masukan nilai a =');readln(a);
writeln('masukan nilai b =');readln(b);
writeln('masukan nilai c =');readln(c);
if a>b then
begin
writeln('nilai a lebih tinggi dari b');
if a>c then
begin
writeln('nilai a paling tinggi');
if b>c then
begin
writeln('nilai c paling rendah');
if c>b then
begin
writeln('nilai b paling rendah');
end
end
end
end
else
if b>a then
begin
writeln('nilai b lebih tinggi dari a');
if b>c then
begin
writeln('nilai b paling tinggi');
if a>c then
begin
writeln('nilai c paling rendah');
if c>a then
begin
writeln('nilai a paling rendah');
end
end
end
else
if c>b then
begin
writeln('nilai c lebih tinggi dari b');
if c>a then
begin
writeln('nilai c paling tinggi');
if a>b then
begin
writeln('nilai b paling rendah');
if b>a then
begin
writeln('nilai a paling rendah');
end
end
end
end
end
end.
PASCAL IF THEN....IF THEN....IF THEN....
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar