{Enter numbers (0 to stop):
12.7
3.4
8.5
0
Largest=12.7
Smallest=3.4}
but i don't know why smallest always ouput 8.5 ..plz help me..
更新1:
plz use repeat loop write again to me..
更新2:
thx for your help..but i am not learing this type of programming.. sorry.i haven't said clearly.. Begin l:=0; s:=0; writeln('Enter numbers (0 to stop):'); repeat
更新3:
readln(n); if l 0 then s:=n; until n=0; writeln('Largest=',l:2:2); writeln('Smallest=',s:2:2); d:=l-s; writeln('Difference=',d:2:2) end.