Multiplication of two Numbers
Write a C++ Program to Multiply two Numbers. Here’s simple C++ Program to Calculate Multiplication of two Numbers in C++ Programming Language.
In this program, user is asked to enter two numbers (floating point numbers). Then, the product of those two numbers is stored in a variable and displayed on the screen.
Here is source code of the C++ Program to Calculate Multiplication of two Numbers. The C++ program is successfully compiled and run(on Codeblocks) on a Windows system. The program output is also shown in below.
SOURCE CODE : :
/* C++ Program to Calculate Multiplication of two Numbers */ #include <iostream> using namespace std; int main() { double first, second, product; cout << "Enter 1st number :: "; cin >> first; cout << "\nEnter 2nd number :: "; cin >> second; product = first * second; cout << "\nProduct of Two Numbers [ "<<first<<" * "<<second<<" ] = " << product<<"\n"; return 0; }
Output : :
/* C++ Program to Calculate Multiplication of two Numbers */ Enter 1st number :: 5 Enter 2nd number :: 8 Product of Two Numbers [ 5 * 8 ] = 40 Process returned 0
- In this program, user is asked to enter two numbers. These two numbers entered by the user is stored in variable first and second respectively.
- Then, the product of first and second is evaluated and the result is stored in variable product.
- Finally, the product is displayed on the screen.
Above is the source code for C++ Program to Calculate Multiplication of two Numbers which is successfully compiled and run on Windows System.The Output of the program is shown above .
If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.
Thanks for reading the post….