O’ZBEKISTON RESBUPLIKASI RAQAMLI TEXNOLOGIYALAR
VAZIRLIGI MUSO AL-XORAZMIY NOMIDAGI
TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI
MUSTAQIL ISHI №1
Bajardi: 714/21-guruh talabasi
Muxammadiyev Komil
Toshkent-2023
Mutaqil ishi №1
1) #include
#include
using namespace std;
int main() {
float x,f,x1,e=pow(10,-5);
cout<<"x="; cin>>x;
f=pow(x,3)+pow(x,2)-3*x-6;
x1=x-((3-x)*f)/(21-f);
cout<<"x1="<
cout<<"f="<
cout<<"d="<
if(fabs(x1-x)
cout<<"shart bajarildi \n";
else
cout<<"shart bajarilmadi";
return 0;
}
2) #include
#include
using namespace std;
int main() {
double x,x1,f,f1;
cin>>x;
f=pow(x,3)+pow(x,2)-3*x-6;
f1=3*pow(x,2)+2*x-3;
x1=x-f/f1;
cout<<"x1="<
cout<
if (abs(x1-x)
cout<<"shart bajarildi";
else
cout<<"shart bajarilmadi";
return 0;
}
Do'stlaringiz bilan baham: |