3-topshiriq
1-misol:
Dastur kodi:
#include
using namespace std;
int main()
{
float k1,k2,Y;
cout << " k1= "; cin >> k1;
cout << " k2= "; cin >> k2;
if(k1*k2<1){
Y=sqrt(2*k1-7*k2);
cout << " Y= " << Y << endl;
}
else if(k1*k2>=1){
Y=sqrt(2*k1+7*k2);
cout << " Y= " << Y << endl;
}
return 0;
}
Dastur Natijasi:
2-misol:
Dastur kodi:
#include
using namespace std;
int main()
{
float a,b,c;
cout << " a= "; cin >> a;
cout << " b= "; cin >> b;
cout << " c= "; cin >> c;
if(a<=b && b<=c){
cout << a;
cout << b;
cout << c;
}
else{
cout << " Shartni qanoatlantirmadi: " << endl;
}
return 0;
}
Dastur Natijasi:
Do'stlaringiz bilan baham: |