Please don't use ANSI C. Define the variables in their first occurrence. (Two lines below.)