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

Am pass the 10000 records to target in target I will take commit interval 15000 when I was stop the work flow what will happened

1336


Write about the scope resolution operator?

779


What is the use of c++ programming language in real life?

768


What's the order in which the local objects are destructed?

1013


What is pointer to member?

768


What are the two shift operators and what are their functions?

806


What is operators in c++?

779


Is nan a c++?

857


What is a binary file? List the merits and demerits of the binary file usagein C++.

951


Give the difference between the type casting and automatic type conversion. Also tell a suitable C++ code to illustrate both.

811


What happens if a pointer is deleted twice?

1013


How would you obtain segment and offset addresses from a far address of a memory location?

821


To what does “event-driven” refer?

819


What is enum c++?

864


True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends

2094