Среда Dev-C++.
Код
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
double alfa,rezult,B,x,y,m,shag;
printf("vvedite koordinatu po osi Y=\n");
scanf(" %f ", &y);
printf("vvedite shag pristrelki\n");
scanf("%f", &shag);
printf("vvedite tocnosti pribligeniya\n");
scanf("%f", &alfa);
printf("vvedite tochku cherez kotoruy dolzgno proiti reshenie X=\n");
scanf(" %f", &x);
m=0;
m=m+shag;
rezult=x*x+m*x+1-y;
while((fabs(rezult)>alfa) || (m>2))
{
m=m+shag;
rezult=x*x+m*x+1-y;
}
if (m>2) printf("tocnosti ne dostignuta vvedite drugoi shag/n");
else
printf("m=%f\n",m);
system("pause");
return 0;
}