How to find product of a number in C++ - Wisdom Lighter

Thursday, 14 June 2018

How to find product of a number in C++

How to calculate a product of a number using integers in C++.
#include <iostream>

using namespace std;

int main()
{
     int first , second , product ;



    cout << "Enter the first integer" << endl;

    cin >> first ;


    cout << "Enter the second integer" << endl;

    cin >> second;


    product = first * second;


    cout << "product = " << product ;


    return 0;
}


Output

No comments:
Write comments