ex16: Convert the main program to not use pointers and malloc