Ajd chapter3

Chapter 3 done.
Yeah, I see I misinterpreted the if statement. Good thing I'm not a compiler.