After I had submitted the solution for the Sum of two numbers problem, my grade was 0 of 3... I have a problem with that because I think my program is good enough... Here is the code:
program suma;
var
M, N, S: integer;
label
PrviBroj, DrugiBroj;
begin
PrviBroj:
write('Uneti prvi broj (0-200): ');
readln(M);
If (M < 0) OR (M > 200) then
begin
writeln('Pogresan unos - broj mora biti izmedju 0 i 200!');
goto PrviBroj;
end;
DrugiBroj:
write('Uneti drugi broj (0-200): ');
readln(N);
If (N < 0) OR (N > 200) then
begin
writeln('Pogresan unos - broj mora biti izmedju 0 i 200!');
goto DrugiBroj;
end;
S:= M + N;
writeln('Suma brojeva je: ', S);
end.
Can someone tell me why they aren't accepting my code?
program suma;
var
M, N, S: integer;
label
PrviBroj, DrugiBroj;
begin
PrviBroj:
write('Uneti prvi broj (0-200): ');
readln(M);
If (M < 0) OR (M > 200) then
begin
writeln('Pogresan unos - broj mora biti izmedju 0 i 200!');
goto PrviBroj;
end;
DrugiBroj:
write('Uneti drugi broj (0-200): ');
readln(N);
If (N < 0) OR (N > 200) then
begin
writeln('Pogresan unos - broj mora biti izmedju 0 i 200!');
goto DrugiBroj;
end;
S:= M + N;
writeln('Suma brojeva je: ', S);
end.
Can someone tell me why they aren't accepting my code?