3-Amaliy mashgulot


Download 113 Kb.
bet1/2
Sana28.10.2019
Hajmi113 Kb.
  1   2

3-Amaliy mashgulot

1-misol


Sharti. (x<5),y=?

Dasturi.


#include

#include

using namespace std;

int main()

{double x,y;

cout<<"x ning qiymatini kiriting=";cin>>x;

{

if (x<5)


y=pow(x,3)-12*x+sqrt(x);

else y=pow((x*x-x*sqrt(x+x*x)),1/3);

cout<<"y="<

}

return 0;



}

Natija


3-Amaliy mashgulot

2-misol

Sharti.a>b, y=?



Dasturi.

#include

#include

using namespace std;

int main ()

{double a,b,y;

cout<<"a ning qiymatini kiriting=";cin>>a;

cout<<"b ning qiymatini kiriting=";cin>>b;

{

if(a>b)


y=sqrt(15*a*a+21*b*b);

else


if

(a<=b)


cout<<"y="<}

return 0;



}#include

#include

using namespace std;

int main ()

{double a,b,y;

cout<<"a ning qiymatini kiriting=";cin>>a;

cout<<"b ning qiymatini kiriting=";cin>>b;

{

if(a>b)



y=sqrt(15*a*a+21*b*b);

else


if

(a<=b)


cout<<"y="<}

return 0;



}

Natija


3-Amaliy mashgulot


Download 113 Kb.

Do'stlaringiz bilan baham:
  1   2




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