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 |
what is smart pointer & use of the smart pointer ???
Why cstdlib is used in c++?
What is #include cmath?
How delete [] is different from delete?
How do you know that your class needs a virtual destructor?
Do vectors start at 0?
What are pointers used for c++?
Explain the benefits of proper inheritance.
Write a program in C++ for Fibonacci series
0 Answers Axtria, ITC Indian Tobacco Company,
when can we use copy constructor?
What do you mean by stack unwinding in c++?
Who created c++?