Write a C++ Program to Multiply two Numbers
Solution:
/* 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 << "
Enter 2nd number :: ";
cin >> second;
product = first * second;
cout << "
Product of Two Numbers [ "<<first<<" * "<<second<<" ] = " << product<<"
";
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
Is This Answer Correct ? | 0 Yes | 0 No |
If dog is a friend of boy and boy is a friend of house, is dog a friend of house?
What is lambda expression c++?
How java is different from c and c++?
Is std :: string immutable?
What is a storage class used in c++?
When should you use multiple inheritance?
What does the following code do: int c=0; cout< a) Undefined *Updated* b) 01 c) 00
What is function overriding?
What is a c++ object?
What is a NULL Macro? What is the difference between a NULL Pointer and a NULL Macro?
How to access a variable of the structure?
What is the full form of ios?