Составить программу для расчета функции :
Текст программы:
#include <iostream.h>
#include <math.h>
#include <conio.h>
float f ( float x )
{
float y1;
y1 = 2 * sqrt(9-2*x) - 3 / sqrt (5*x-4);
return y1;
}
void main()
{
float x,y;
cout<<"\nВведите х: ( x > 0.8 И x <= 4.5) -> ";
cin>>x;
if (( x > 0.8 )&&( x <= 4.5 ))
{
y=f(x);
cout <<" y = "<<y;
}
else cout<<"\n Неверный ввод";
cout <<" для выхода - жми клавишу \n";
getch();
}
Исполняемый файл pr8_0.exe (упакованный)
|