|
|
back to boardTest 6. What's wrong? pascal Posted by Nick 8 Mar 2016 20:23 var minutes, carsAtMin, stay, i: byte; countOfCars: array[0..100] of integer; BEGIN readln(carsAtMin, minutes); stay := 0; for i:=1 to minutes do readln(countOfCars[i]); for i:=1 to minutes do begin countOfCars[i] := countOfCars[i] + stay; stay := 0; if (countOfCars[i] - carsAtMin > 0) then stay := countOfCars[i] - carsAtmin; end; if (stay > 0) then write(stay) else write('0'); END. |
|
|