Wrote the code, and prints output to console.