These examples were written in class. The first is to demonstrate type conversion and type casting. I would not really write a program this way, but it illustrates the point.

The second had a bug, which was fixed right after class.