Ajd chapter2

Chapter 2 answers
As sum is declared inside the for loop, it's also out of scope for the println