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

Is there a c++ certification?

0 Answers  


Which function cannot be overloaded c++?

0 Answers  


daily Routine of father

0 Answers  


What is java and c++?

0 Answers  


Can there be at least some solution to determine the number of arguments passed to a variable argument list function?

0 Answers  






What are its advantages and disadvantages of multiple inheritances (virtual inheritance)?

0 Answers  


Write the program form Armstrong no in c++?

11 Answers   HCL,


what are prototypes

4 Answers   Infosys, TCS,


What does obj stand for?

0 Answers  


What are references in c++? What is a local reference?

0 Answers  


How does c++ sort work?

0 Answers  


What is a character in c++?

0 Answers  


Categories