Hello world!
I'm new to FPC and Lazarus community.
So I have a question that I can't answer for a time. It may sound stupid but what does 'exit code 201' mean?
I post my answers for questions to a site (campion.edu.ro) and when it runs the program no problems detected and I have max points 4 the answer but when I do the same thing on my computer it compiles the program successfuly but when running sends exit code 201. I don't know where the mistake is but I know it's smth with the loop(when I delete the loop problem disappear).
Here is my input file/program code(the files too if needed):
Input:12343
2002
4002
3003
Program:type t=array[1..1000] of longint;
var a,b:t;
n,i,c:integer;
s:longint;
m,g:text;
begin
assign(m,'bancomat.in');
reset(m);
readln(m,s);
readln(m,n);
for i:=1 to n do
read(m,a
);
close(m);
for i:=1 to n do
begin
c:=a mod 10;
if c=2 then
s:=s+(a div 10) else
if c=3 then
if s>(a div 10) then
s:=s-(a div 10);
end;
assign(g,'bancomat.out');
rewrite(g);
writeln(g,s);
close(g);
end.
Thanks a lot for time spent with my stupid question looking for a nice answer.
Have a nice day.