Modified greeting program to utilize loops