fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b;
  6. cin >> a >> b;
  7.  
  8. cout << "Tong: " << a + b << endl;
  9. cout << "Hieu: " << a - b << endl;
  10. cout << "Tich: " << a * b << endl;
  11. cout << "Thuong: " << (double)a / b << endl; // ép kiểu
  12. cout << "Du: " << a % b << endl;
  13.  
  14. return 0;
  15. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
Tong: -2049424178
Hieu: -2049489710
Tich: -692554144
Thuong: -62548.3
Du: -9176