program large_and_small;
var
a,b,c,d:real;
large,small:real;
begin
write('Please input four numbers: ');
read(a,b,c,d);
if (a>b) and (b>c) and (c>d) then
large:=a;
if (b>c) and (c>d) and (d>a) then
large:=b;
if (c>d) and (d>a) and (a>b) then
large:=c;
if (d>a) and (a>b) and (b>c) then
large:=d;
if (a
2007-02-25 15:49:35 補充:
未試過test...唔知run唔run到...
2007-02-27 19:48:31 補充:
上面果個..好似唔得,用呢個@@
2007-02-27 19:51:07 補充:
Program a;var a,b,c,d:integer;
2007-02-27 19:51:39 補充:
begin writeln('Input four numbers'); readln(a,b,c,d);
2007-02-27 19:51:58 補充:
if (a>b)and(b>c)and(c>d) then writeln('Largest = ',a,' Smallest = ',d); if (b>c)and(c>d)and(d>a) then writeln('Largest = ',b,' Smallest = ',a);
2007-02-27 19:52:17 補充:
if (c d)and(d a)and(a b) then writeln('Largest = ',c,' Smallest = ',b); if (d a)and(a b)and(b c) then writeln('Largest = ',d,' Smallest = ',c);end.
參考: 自己