c 2b 2b multiply

Solutions on MaxInterview for c 2b 2b multiply by the best coders in the world

showing results for - "c 2b 2b multiply"
Marwane
12 Jan 2019
1// Program to multiply 2 numbers from user inputs
2
3#include <iostream>
4using namespace std;
5
6int main()
7{
8    double firstNumber, secondNumber, productOfTwoNumbers;
9    cout << "Enter two numbers: ";
10
11    // Stores two floating point numbers in variable firstNumber and secondNumber respectively
12    cin >> firstNumber >> secondNumber;
13 
14    // Performs multiplication and stores the result in variable productOfTwoNumbers
15    productOfTwoNumbers = firstNumber * secondNumber;  
16
17    cout << "Product = " << productOfTwoNumbers;    
18    
19    return 0;
20}