fork download
  1. // program to accept two numbers from the user and give the product
  2. #include <iostream>
  3. int main() {
  4. int firstNumber { };
  5. int secondNumber { };
  6.  
  7. std::cout << "Enter two numbers separated by space: ";
  8. std::cin >> firstNumber >> secondNumber;
  9.  
  10. std::cout << "The product of the numbers: " << firstNumber << " and " << secondNumber <<
  11. " is " << firstNumber * secondNumber << std::endl;
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0.01s 5296KB
stdin
10 20 
stdout
Enter two numbers separated by space: The product of the numbers: 10 and 20 is 200