#include<iostream.h>
#include<conio.h>
int rec (int,int);
int main()
{
int i,a,b;
cout<<" enter the 1st Number : ";
cin>>a;
cout<<" enter the 2nd Number : ";
cin>>b;
cout<<"\n\n\n\n MuLtiplication of No's without Using * operator : ";
cout<< rec(a,b);
cout<<"\n\n\n\n";
}
int rec ( int a , int b)
{
if ( b > 1)
{
return a+rec(a,b-1);
}
else
{
return a ;
}
}
output :
- Blogger Comment
- Facebook Comment
Subscribe to:
Post Comments
(
Atom
)
0 comments:
Post a Comment