Write a C++ Program to Multiply two Numbers
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 |
Which is the best c++ compiler?
When a function is made inline. Write the situation where inline functions may not work.
write a program that takes two numbers from user that prints the smallest number
In a class only declaration of the function is there but defintion is not there then what is that function?
Why iomanip is used in c++?
Write a C++ Program to Multiply two Numbers
Is it possible to provide default values while overloading a binary operator?
Do inline functions improve performance?
What do you mean by overhead in c++?
Does c++ support exception handling?
Write a program that will count the number of digits in an input integer up to value MAX_VALUE (2147483647). Thus, for an input of 5837 the output should be 4 digits Make sure that your program works for the numbers 0, 1, and 10. For the number 0, the output should be 1 digit
Is it possible for the objects to read and write themselves?