Write a C++ Program to Multiply two Numbers

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a pointer is deleted twice?

795


Describe the setting up of my member functions to avoid overriding by the derived class?

614


How can a struct in c++ differs from a struct in c?

614


How do you print a string on the printer?

583


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

1509






Should the member functions which are made public in the base class be hidden?

568


What is an incomplete type in c++?

772


declare an array of structure where the members of the structure are integer variable float variable integer array char variable access all elements of the structure using dot operator and this pointer operator

1743


Can you sort a set c++?

532


Write about all the implicit member functions of a class?

602


Is c better than c++?

623


What is the best way to take screenshots of a window with c++ in windows?

575


Program to check whether a word is a sub-string or not of a string typed

1601


Write about the use of the virtual destructor?

612


What is purpose of abstract class?

589