fork download
  1. #include<iostream>
  2. using namespace std;
  3. int main() {
  4. int num1, num2, difference, product;
  5.  
  6. cout << "Enter first number: ";
  7. cin >> num1;
  8.  
  9. cout << "Enter second number: ";
  10. cin >> num2;
  11.  
  12. difference = num1 - num2;
  13. product = num1 * num2;
  14.  
  15. cout << "Difference: " << difference << endl;
  16. cout << "Product: " << product << endl;
  17.  
  18. return 0;
  19. }
Success #stdin #stdout 0.01s 5288KB
stdin
10
5
stdout
Enter first number: Enter second number: Difference: 5
Product: 50