fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. double num1, num2, product;
  6. cout << "Enter two numbers:";
  7.  
  8. // stores two floating print numbers in num1 and num2 respectively
  9. cin >> num1 >> num2;
  10.  
  11. // performs multiplication and stores the result in product variable
  12. product = num1 * num2;
  13.  
  14. cout << "Product =" << product;
  15.  
  16. return 0;
  17. }
  18.  
Success #stdin #stdout 0.01s 5492KB
stdin
34
8
stdout
Enter two numbers:Product =272