A Program to Multiply Two Numbers
In this example, we are giving a program to multiply two given numbers which are given by the users.
Program to find the ASCII value:
#include <iostream>
using namespace std;
int main()
{
double firstNumber, secondNumber, product;
cout << "Enter two numbers: ";
// Stores two floating point numbers
cin >> firstNumber >> secondNumber;
// Stores the result of multiplication
product = firstNumber * secondNumber;
// Displays the result of multiplication
cout << "Product = " << product;
return 0;
}
Output:
Enter two numbers: 7.5 3.7 Product = 27.75