Tuesday, 12 April 2016

Write a program in c++ to find multiplication of two nos using function.

//wap in c++ to find multiplication of two nos using function.


Coding:-

#include<iostream.h>
#include<conio.h>

int mul(int num1,int num2);
int main()
{
clrscr();

int a,b;
cout<<"enter first no";
cin>>a;
cout<<"\n enter second no";
cin>>b;
int ret;
ret=mul(a,b);
cout<<"multiplication of two nos is:"<<ret;
getch();
return 0;
}

int mul(int num1,int num2)
{
int result;
result=num1*num2;
return result;
}
Output:-

No comments:

Post a Comment