Bài 5:
#include <bits/stdc++.h>
using namespace std;
double a,b,c,d,ln,nn;
int main()
{
cin>>a>>b>>c>>d;
ln=a;
ln=max(ln,b);
ln=max(ln,c);
ln=max(ln,d);
nn=a;
nn=min(nn,b);
nn=min(nn,c);
nn=min(nn,d);
cout<<"So lon nhat la:"<<fixed<<setprecision(2)<<ln<<endl;
cout<<"So nho nhat la:"<<fixed<<setprecision(2)<<nn;
return 0;
}
1.
#include <bits/stdc++.h>
using namespace std;
float a,b;
int main()
{
cin>>a>>b;
if(a==0)
{
if(b==0)
cout<<"Phuong trinh co vo so nghiem"<<endl;
else
cout<<"Phuong trinh vo nghiem"<<endl;
}
else
cout<<"Phuong trinh co mot nghiem la x: "<<-b/a<<endl;
return 0;
}