-
Notifications
You must be signed in to change notification settings - Fork 2
/
lab30functs.c
executable file
·56 lines (45 loc) · 1.78 KB
/
lab30functs.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/** lab30functs.c
* ===========================================================
* Name: FIRST LAST, DATE
* Section: SECTION
* Project: Lab 30
* =========================================================== */
#include "lab30functs.h"
/** ----------------------------------------------------------
* @fn int count_ears(int num_bunnies);
* @brief recursive function to count the number of ears on N bunnies
* @param num_bunnies the input value, the number of bunnies
* @return the total number of ears, assuming each has 2 ears
* ----------------------------------------------------------
*/
int count_ears(int num_bunnies) {
// Base Case
// Recursive Case
return 0;
}
/** ----------------------------------------------------------
* @fn int num_buns_in_pyramid(int num_levels);
* @brief recursive function to count the totals number of buns in a bunny pyramid
* @param num_levels the input value, the number of levels in the pyramid
* @return the total number of buns, assuming the top level has 1 bun, and each lower
* has 1 more bun than the last
* ----------------------------------------------------------
*/
int num_buns_in_pyramid(int num_levels) {
// Base Case
// Recursive Case
return 0;
}
/** ----------------------------------------------------------
* @fn int count_ears2(int num_bunnies);
* @brief recursive function to count the number of ears on N bunnies
* @param num_bunnies the input value, the number of bunnies
* @return the total number of ears, assuming each odd bun has 2 ears
* but the even buns have 3 ears
* ----------------------------------------------------------
*/
int count_ears2(int num_bunnies) {
// Base Case
// Recursive Case
return 0;
}