Could the computer science teacher explain why these two programs give different results?