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

i want the NIC programmer-B model papaer pattren, iwant the all model papers?

15 Answers   NIC,


Is it possible to get the source code back from binary file?

1 Answers  


Write a corrected statement in c++ so that the statement will work properly. if (4 < x < 11) y=2*x;

0 Answers  


What does obj stand for?

0 Answers  


Is it possible to write a c++ template to check for a function's existence?

0 Answers  






catch(exception &e) { . . . } Referring to the sample code above, which one of the following lines of code produces a written description of the type of exception that "e" refers to? a) cout << e.type(); b) cout << e.name(); c) cout << typeid(e).name(); d) cout << e.what(); e) cout << e;

2 Answers   Quark,


Which is the best c++ compiler for beginners?

0 Answers  


What is malloc in c++?

0 Answers  


How many keywords are used in c++?

0 Answers  


There is a array of 99 cells and we have to enter 1-100 elements in it , no two elements would repeat , so the is one no. missing because 99 cells and 1-100 nos. so we had to implement a function to find that missing no.

2 Answers   Nagarro,


Explain the different access specifiers for the class member in c++.

0 Answers  


What's the hardest coding language?

0 Answers  


Categories