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 |
Why is standard template library used?
What does return 0 do in c++?
Define precondition and post-condition to a member function?
Why seem interrupt handlers as member functions to be impossible?
Difference between shift left and shift right?
What are the various storage classes in C++?
wrong statement about c++ a)code removably b)encapsulation of data and code c)program easy maintenance d)program runs faster
What are the unique features of C++.
What is fixed in c++?
Tell me difference between constant pointer and pointer to a constant.
Who discovered c++?
Differentiate between realloc() and free().