|
-
January 17th, 2002, 11:44 AM
#1
simple recursion program using mathematical induction
Hi, I am trying to write a program that utilizes mathematical induction. Where the user enter a target greater than 8 and the program will figure out how many 3 and 5 will be needed to add up to that target. I wrote the main function already but I don't know how to write the following function using mathematical induction. Could anyone help me? Thanks.
Function prototype:
int calc( int x, int &three, int &five );
// x= target value
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|