
Trace table help
I'm confused on how to provide a trace table with this problem.
int i = 0; int j = 1; int n = 2;
while (i < 10) {i++; n = n + i + j; j++; }
My professor wants us to use iterations as a way to solve it and this was the example given:
int i = 0; int j = 1; int n = 2;
while (i < j) { i ++; j ; n++; }
public static String r43a() {
// START CODE
String answer = "iteration1: i=" + 0 + ", j=" + 1 + ", n=" + 2 ;
answer += "\n";
answer += "iteration2: i=" + 1 + ", j=" + 0 + ", n=" + 3 ;
return answer;
// STOP CODE
}

Re: Trace table help
Can you give some details about your problem? For example what do you mean by "trace table"?