Thursday 23 January 2020

Simple method to multiply two numbers in CPP

Source Code:
#include<iostream>
using namespace std;
int main()
{
int a,b,c;
cout<<"Enter two numbers: ";
cin>>a>>b;
c=a*b;
cout<<"The product of two numbers is: ";
cout<<c;
return 0;
}

Program Output:
Enter two numbers: 5
6

The product of two numbers is: 30

No comments:

Post a Comment