C++ program to read two numbers and display their product

#include <iostream>
using namespace std;
int main()
{
    int a,b,p;
    cout<<"Enter two numbers: "<<endl;
    cin>>a>>b;
    p=a*b;
    cout<<"Their product is "<<p;
    return 0;
}

No comments:

Post a Comment