Write a C++ Program to Multiply two Numbers



Write a C++ Program to Multiply two Numbers..

Answer / hr

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

Post New Answer

More C++ General Interview Questions

Why is standard template library used?

0 Answers  


What does return 0 do in c++?

0 Answers  


Define precondition and post-condition to a member function?

1 Answers  


Why seem interrupt handlers as member functions to be impossible?

1 Answers  


Difference between shift left and shift right?

1 Answers   Symphony,






What are the various storage classes in C++?

0 Answers   Fidelity,


wrong statement about c++ a)code removably b)encapsulation of data and code c)program easy maintenance d)program runs faster

11 Answers  


What are the unique features of C++.

0 Answers  


What is fixed in c++?

0 Answers  


Tell me difference between constant pointer and pointer to a constant.

0 Answers   Honeywell, Zomato,


Who discovered c++?

0 Answers  


Differentiate between realloc() and free().

0 Answers  


Categories