that was helpful, thanks
Type: Posts; User: johnmerlino
that was helpful, thanks
In this code snippet:
public static int[][] pascalTriangle(int n) {
int[][] pt = new int[n][];
for (int i = 0; i < n; i++) {
pt[i] = new int[i + 1];
...
In this code:
public static void main(String[] args) {
System.out.println(tailrecsum(5,0));
}
private static int tailrecsum(int x,int running_total, int default_total){
if(x == 0){
thanks for response
the first two numbers in the Fibonacci sequence are 0 and 1, and each subsequent number is the sum of the previous two.
So I would expect output like this:
0,1,1,2,3,5...
private...