Umiestnenie súboru www.TrSek.com/zadania/cislo3.pas{ CISLO3.PAS }
{ Usporiadanie 3 cisel. }
{ }
{ Author: Juraj Pupak }
{ Date : 27.10.2006 http://www.trsek.com }
program cislo;
uses crt;
var
a,b,c,max_num:integer;
begin
clrscr;
writeln('Porovnanie 3 cisel');
writeln('------------------');
writeln('Zadaj prve cislo');
readln(a);
writeln('Zadaj druhe cislo');
readln(b);
writeln('Zadaj tretie cislo');
readln(c);
clrscr;
IF (a > b) and (b > c) THEN
begin
writeln('Najvacsie cislo je ',a,'. Druhe cislo je ',b,'. Najmensie cislo je ',c,'.');
end;
IF (b > a) and (a > c) THEN
begin
writeln('Najvacsie cislo je ',b,'. Druhe cislo je ',a,'. Najmensie cislo je ',c,'.');
end;
IF (c > a) and (a > b) THEN
begin
writeln('Najvacsie cislo je ',c,'. Druhe cislo je ',a,'. Posledne cislo je ',b,'.');
end;
IF (c > b) and (b > a) THEN
begin
writeln('Najvacsie cislo je ',c,'. Druhe cislo je ',b,'. Posledne cislo je ',a,'.');
end;
IF (a > c) and (c > b) THEN
begin
writeln('Najvacsie cislo je ',a,'. Druhe cislo',c,'. Posledne cislo',b,'.');
end;
IF (b > c) and (c > a) THEN
begin
writeln('Najvacsie cislo je ',b,'. Druhe cislo je ',c,'. Posledne cislo je ',a,'.');
end;
readln;
end.