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 |
What is private public protected in c++?
what are difference between c and c++?
Which field is used in c++?
Explain the auto storage classes in c++.
What is token c++?
What is endianness?
What is anonymous object in c++?
When should we use container classes instead of arrays?
What is the correct syntax for inheritance a) class aclass : public superclass b) class aclass inherit superclass c) class aclass <-superclass
write a porgram in c++ that reads an integer and print the biggest digit in the number
What are the extraction and insertion operators in c++? Explain with examples.
What data structure is fastest, on average, for retrieving data: a) Binary Tree b) Hash Table c) Stack