Fan nomi
|
Dasturlash 1
|
FIO
|
Jo’rayev Nodirbek
|
Guruhi
|
710-21
|
|
|
Dastur kodi:
#include
#include
using namespace std;
int main(){
float a,b,c,max1,max2,max3,s;
cout<<"a="; cin>>a;
cout<<"b="; cin>>b;
cout<<"c="; cin>>c;
if(a>(a+b)){
max1=a;
}
else{
max1=a+b;
}
if(a>(b+c)){
max2=a;
}
else{
max2=b+c;
}
if((a+b*c)>1.15){
max3=a+b*c;
}
else{
max3=1.15;
}
s=(max1+max2)/(1+max3);
cout<<"s="<return 0;
}
Natija:
Xulosa:
Men Jo’rayev Nodirbek funksiya mavzusidagi formula orqali manashu natijalarni oldim.Bunda a,b,c lar haqiqiy sonlar bo’lib cout<<”s=” ulardan olingan natijadir.
Do'stlaringiz bilan baham: |