Modified maxiumum program to use a function which takes a pointer as a parameter.