question answers
Thursday, June 27, 2013
Write a recursive function to find multiple of two numbers.
int mul(int a, int b)
{
if(b==0 || a==0)
return 0;
else if(b==1)
return a;
else
return(a + mul(a,b-1));
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment