Dasturlash ” fanidan tayyorlagan 1-amaliy ishi (C++ dasturlash tilida) O’qituvchi: Falonchiyev Falonchi Toshkent – 2023 Variant – 29


Download 0.72 Mb.
Sana17.10.2023
Hajmi0.72 Mb.
#1705621
Bog'liq
PRG 1


O‘ZBEKISTON RESPUBLIKASI AXBOROT TEXNOLOGIYALARI VA KOMMUNIKATSIYALARINI RIVOJLANTIRISH VAZIRLIGI


MUHAMMAD AL-XORAZMIY NOMIDAGI TOSHKENT AXBOROT TEXNOLOGIYALARI UNIVERSITETI

“_____________________” yo’nalishi


PRG___-_-guruh talabasi
Falonchiyev Falonchining
Dasturlash _-_” fanidan tayyorlagan
1-amaliy ishi
(C++ dasturlash tilida)
O’qituvchi: Falonchiyev Falonchi


Toshkent – 2023


Variant – 29
1-misol.



Dastur kodi :


#include
#include


using namespace std;


int main() {
float a, z, x, y;
cout << "\n z ning qiymatini kiriting : z = ";
cin >> z;
cout << "\n a ning qiymatini kiriting : a = ";
cin >> a;
if(z > 1) {
x = pow(z, 2);
}else {
x = z + 1;
}
y = a * log(1 + pow(x, 1./5)) + pow(sin(x + 1), 3);
cout << "\n Natijalar : " << endl;
cout << " x = " << x << endl;
cout << " y = " << y << endl;
cout << endl;
return main();
}
Dasturning oynada ko`rinishi :

Dastur natijasi :



2-misol.



Dastur kodi :


#include
#include


using namespace std;


int main() {
float r, s, t;
cout << "\n r ning qiymatini kiriting : r = ";
cin >> r;
cout << "\n s ning qiymatini kiriting : s = ";
cin >> s;
if(fabs(r - 2 * s) <= 1) {
t = (r - 2 * s)/(pow(r, 2) + 2 * pow(s, 2));
}else {
t = 2/(r - 2 * s);
}
cout << "\n Natija : " << endl;
cout << " t = " << t << endl;
cout << endl;
return main();
}


Dasturning oynada ko`rinishi :

Dastur natijasi :



3-misol



Dastur kodi :


#include
#include


using namespace std;


int main() {
float x, y, A, B;
cout << "\n x ning qiymatini kiriting : x = ";
cin >> x;
cout << "\n y ning qiymatini kiriting : y = ";
cin >> y;
A = pow(cos(3.75 + sqrt(pow(y, 2) + exp(x))), 2) + log(fabs(y))/sin(pow(y, 2) + exp(x));
B = (tan(A/exp(x * y)) + A * (pow(y, 2) + exp(x) + 8.1 * pow(10, -4)))/(pow(x, 1./3) + A * sin(pow(y, 2) + exp(x)));
cout << "\n Natija : " << endl;
cout << " A = " << A << endl;
cout << " B = " << B << endl;
cout << endl;
return main();
}


Dasturning oynada ko`rinishi :



Dastur natijasi :

Download 0.72 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling