Write a  C++ Program to Multiply Two Numbers

C++ Program to Multiply Two Numbers

Welcome to the World of Online Learning:

Hello Friends “This blog helps you to learn C++ programming concepts. You can learn C++ language at your own speed and time. One can learn concepts of C++ language by practicing various programs given on various pages of this blog. Enjoy the power of Self-learning using the Internet.”

C++ Program to Multiply Two Numbers
C++ Program to Multiply Two Numbers

Write a  C++ Program to Multiply Two Numbers

PROGRAM: C++Program to Multiply Two Numbers

/*C++Program to Multiply Two Numbers*/

#include <iostream>
using namespace std;

int main() {
double num1, num2, product;
cout << “Enter two numbers: “;

// stores two floating point numbers in num1 and num2 respectively
cin >> num1 >> num2;

// performs multiplication and stores the result in product variable
product = num1 * num2;

cout << “Product = ” << product;

return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *