Fix the bug in the code in the earlier subsection “Tracing Variables.”
Add some suitable output statements to the following code so that all variables
are traced:
int n, sum = 0;
for (n = 1; n <>
sum = sum + n;
System.out.println("1 + 2 + ...+ 9 + 10 == " + sum);
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here