Exercise: find the issues in the program

Exercise

 

Solution