Use the following function puzzle(..) to answer problems 1 - 3.
int puzzle(int base, int limit) { //base and limit are nonnegative numbers if ( base > limit ) return -1; else if ( base == limit ) return 1; else return base * puzzle(base + 1, limit); }
void show ( int n) { if (n) show (n/10); System.out.print((n%10)); } void show ( int n) { System.out.print((n%10)); if (n) show (n/10); } void show ( int n) { System.out.print((n%10)); if (n) show (n/10); System.out.print((n%10)); }
double sum(int n) // n>=1 { if (___________) return _____________; return ______ + sum(______); }