Переведите в С++ пожалуйста Var a,b,t,M,R:integer; Function F(x:integer):integer; begin F:= x*x - 8*x + 10; end; BEGIN a:=-5; b:=5; M:=a; R:=F(a); for t:=a to b do begin if (F(t)> R)then begin M:=t; R:=F(t); end;
#include using namespace std; int main() { int a = 0, b = 0, t = 0, M = 0; int R = 0, F = 0, x = 0; F = x * x - 8 * x + 10; a = -5; b = 5; M = a; for(;t == a;) { if(t > R) { M = t; R = F; } } }