Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- float x,y,a,b,c,d;
- cout << "Nhap x: ";
- cin >> x;
- cout << "Nhap y: ";
- cin >> y;
- a=x+y;
- b=x-y;
- c=x*y;
- if (y!=0)
- {
- d=x/y;
- cout << "Tong = " << a << endl;
- cout << "Hieu = " << b << endl;
- cout << "Tich = " << c << endl;
- cout << "Thuong = " << d << endl;
- }
- else
- {
- cout << "Tong = " << a << endl;
- cout << "Hieu = " << b << endl;
- cout << "Tich = " << c << endl;
- cout << "Khong co thuong";
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement