Monday, 14 December 2015

Write a program that input two numbers and multiply them using a function

#include<iostream>
#include<conio.h>
using namespace std;
int mul(int x,int y)
{
   return(x*y);
}
main()
{ int a,b;
cout<<"Enter two numbers to multiply"<<endl;
cin>>a>>b;
int res1=mul(a,b);
cout<<"product is "<<res1;
getch();
}

No comments:

Post a Comment