I've tried, and it's true that if you say too many numbers, you will make mistakes. It's not about your program. Your design uses %d, which is an integer variable. What is the maximum value of an integer variable? A little bigger will cross the line and the display will be wrong.
I use Vc6, and the largest integer is ten digits. No matter how big it is, as long as the number you output does not exceed the limit, it is right.