em hãy viết chương trình nhập vào 2 số a và b yêu cầu tính tổng hiệu tích thương của 2 số đó nếu b là số 0 thì thông báo là không tính được
K
Khách
Hãy nhập câu hỏi của bạn vào đây, nếu là tài khoản VIP, bạn sẽ được ưu tiên trả lời.
Những câu hỏi liên quan
24 tháng 10 2021
#include <bits/stdc++.h>
using namespace std;
double a,b,c,p;
int main()
{
cin>>a>>b>>c;
p=a+b+c;
cout<<fixed<<setprecision(2)<<p;
return 0;
}
17 tháng 12 2021
#include <bits/stdc++.h>
using namespace std;
string st;
int d,i,kt;
char x,ln;
int main()
{
getline(cin,st);
d=5;
x=st[2];
ln=st[0];
for (i=1; i<=d-1; i++)
if (ln<=st[i]) ln=st[i];
if (ln==x) cout<<"YES";
else cout<<"NO";
return 0;
}
#include <bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
cin>>a>>b;
if (b==0) cout<<"Ko tinh duoc";
else
{
cout<<a+b<<endl;
cout<<a-b<<endl;
cout<<a*b<<endl;
cout<<a/b;
}
return 0;
}