Bajardi: Bekpo’latov Ahrorbek
Download 0.9 Mb.
|
6 chizma
MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI Amaliy ish Bajardi: Bekpo’latov Ahrorbek TOSHKENT 2023 Vazifa: A(x,y) nuqta berilgan, x,y koordinata klaviaturadan kiritiladi. Shu A(x,y) nuqta Shttrihlangan sohaga tegishli bo’lsa True aks holda False qiymat chiqaruvchi dastur tuzing. #include using namespace std; int main() { float x, y; cout << "x va y ni kiriting: "; cin >> x >> y; cout << "Kiritilgan nuqtalar bo'yalgan sohaga "; if ((x * x + y * y) <= 4 && (((x <= 0 && ((x + 1) * (x + 1) + y * y) >= 1) || x > 0) || (x == y && x == 0))) { cout << "tegishli\n"; } else { cout << "tegishli emas\n"; } main(); } Vazifa: switch case operatoridan foydalanib berilgan y funksiyani hisoblovchi dastur tuzing. #include using namespace std; int main(){ int n; float a,b,z,x,y; cout<<"x = "; cin>>x; cout<<"Case tanlang = "; cin>>n; switch (n) { case 1: a=-5, b=2.5, z=log(abs(b*pow(x,3))); break; case 2: a=3, b=5, z=log(abs(b*x)); break; case 3: a=-10, b=3, z=log(abs(b*pow(x,2))); break; default: cout<<"Bunday case yo'q."; break; } if (x{ y=2.8*pow(sin(a*x),2)-b*pow(x,3)*z; } else if(a<=x<=pow(b,2)){ y=z*cos(pow((a*x+b),2))+log(z); } else if(x>pow(b,2)){ y=exp(2.5*a*x)+z*a*b*x; } cout<<"y = "< Download 0.9 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling