(int n)
| 27 | } |
| 28 | |
| 29 | public static int calcSum(int n) { |
| 30 | if(n == 1) { |
| 31 | return 1; |
| 32 | } |
| 33 | int Snm1 = calcSum(n-1); |
| 34 | int Sn = n + Snm1; |
| 35 | return Sn; |
| 36 | } |
| 37 | |
| 38 | //calculate nth term in fibonacci |
| 39 | public static int fib(int n) { |
nothing calls this directly
no outgoing calls
no test coverage detected