C++ Program to Find Product of Two Numbers

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

Recommended Posts
C++ Program to Add Two Numbers
C++ Program to Count Zeros, Positive and Negative Numbers
C++ Program for Input and Output of Integer
C++ Program to Find Sum of Natural Numbers
C++ Program to Find Quotient and Remainder
C++ Program to Swap Two Numbers
C++ Program to Find LCM and GCD of Two Numbers
C++ Program Linear Search in Array
C++ Program to Make a Simple Calculator
All C++ Programs