Fixing variables in Do While Loop

Fixing variables in Do While Loop