Function F(x:integer):integer; begin F:= 2*x*x + 8*x + 10; end; BEGIN Readln(a,b); M:=а; R:=F(а); for t:=a to b do bеgin if (F(t)>R) thеn bеgin М:=t; R:=F(t); writеln(M,f(t)); end; end; writeln(M,f(t)); end; write(M); END 

compiler message:

[pabcnetc.exe] Start compiling assembly Program8.pas ...

[pabcnetc.exe] Start compilation of Program8.pas ... 1 error encountered 'if' and expected ';'

[pabcnetc.exe] Compilation Completed Program8.pas

[pabcnetc.exe] Ready

  • compiler message [pabcnetc.exe] Start compilation of the assembly Program8.pas ... [pabcnetc.exe] Start compilation of Program8.pas ... 1 errors Encountered 'if', but expected ';' [pabcnetc.exe] Compilation Completed Program8.pas [pabcnetc.exe] Ready - Julia Grishanina
  • one
    it should be added to the question text, not a comment - Sublihim
  • one
    and it seems to me you have the quantity begin less quantity end - Sublihim
  • I'll see now - Julia Grishanina
  • still not far behind if - Julia Grishanina

1 answer 1

Because you have a part of the letters in the Latin register, and a part in Russian, in particular, the letters e, M, a. And the extra end, as was rightly noted. So it will be right:

 Function F(x:integer):integer; begin F:= 2*x*x + 8*x + 10; end; var a, b, m, r ,t : Integer; BEGIN Readln(a,b); M:=a; R:=F(a); for t:=a to b do begin if (F(t) > R) then begin M:=t; R:=F(t); writeln(M,f(t)); end; end; writeln(M,f(t)); write(M); END. 

And try to format the code decently in the future. After all, it is impossible to read it :)

  • Thank you, I just did not know how to drive it here. And so I have the same beautiful as you. Thanks again! - Julia Grishanina