Amaliy topshiriq Turdiyev Sanjar



Yüklə 32,56 Kb.
tarix24.03.2023
ölçüsü32,56 Kb.
#124313
1-Amaliyot topshiriq dasturlash


  1. Amaliy topshiriq

Turdiyev Sanjar


020-21-guruh

  1. Variant

12-Misol



12



/******************************************************************************


Online C++ Compiler.


Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/


#include


using namespace std;


int
main ()


{
float k, y;
cin >> k;
if (sin (k) <= 0.2)
y = sqrt (k);
else
y = 1 / sqrt (k);
cout << "y=" << y << endl;
main ();

return 0;


}
Case12. X, Y haqiqiy va amal butun son berilgan. X va Y sonlari ustiga arifmetik amallar bajaruvchi dastur tuzilsin. Amal quyidagi qiymatlarni qabul qiladi: 1-qo’shish, 2-ayirish, 3-bo’lish, 4-ko’paytirish.

/******************************************************************************


Online C++ Compiler.


Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/


#include


using namespace std;


int
main ()


{
double x;
double y;
cout << "Birinchi sonni kiriting: ";
cin >> x;
cout << "Ikkinchi sonni yozing: ";
cin >> y;
cout << "x+y=" << x + y << endl;
cout << "x-y=" << x - y << endl;
cout << "x*y=" << x * y << endl;
cout << "x/y=" << x / y << endl;

return 0;


}

Natija:



Birinchi sonni kiriting: 3
Ikkinchi sonni yozing: 6
x+y=9
x-y=-3
x*y=18
x/y=0.5
Yüklə 32,56 Kb.

Dostları ilə paylaş:




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin