C++ Program to Find Product of Two Numbers

  • Write a C++ program to multiply two numbers using "*" multiplication operator.

C++ Program to Multiply Two Numbers

#include <iostream>

using namespace std;

int main() {
    float a, b, product;
    cout << "Enter two Numbers\n";
    cin >> a >> b;
    product = a*b;
    cout << "Product = " << product;
    return 0;
}
Output
Enter two Numbers
2.5 3
Product = 7.5