prog.cpp:1:1: error: 'var' does not name a type
var S, K, A, B, N, rez:longint;
^
prog.cpp:2:1: error: 'begin' does not name a type
begin
^
prog.cpp:4:5: error: expected unqualified-id before 'if'
if s*a=b then writeln (s*k)
^
prog.cpp:8:23: error: expected unqualified-id before 'while'
while n<1001 do
^
prog.cpp:13:36: error: expected unqualified-id before 'if'
if (rez>=0) and (a>n*k) then
^
prog.cpp:16:68: error: 'halt' does not name a type
halt;
^
prog.cpp:17:63: error: 'end' does not name a type
end;
^
prog.cpp:18:31: error: 'end' does not name a type
end;
^
prog.cpp:19:32: error: expected constructor, destructor, or type conversion before '(' token
inc (n);
^
prog.cpp:20:23: error: 'end' does not name a type
end;
^
prog.cpp:21:23: error: expected unqualified-id before 'if'
if n=1001 then writeln (-1);
^
prog.cpp:22:18: error: 'end' does not name a type
end;
^
prog.cpp:23:1: error: 'end' does not name a type
end.
^