Using double ensures that the program can handle both integer and decimal percentage values, providing more accurate and flexible calculations.