Probably you are asking about why that getch is there at the end of main, right?
see as people explained above getch accepts a charater from user but does not display it. Now when you run the program and display your numbers, after showing 10 numbers you ask user "do you wish to continue (y/n)".
If user says "y" i.e. yes then program continues so user can see the next 10 numbers.
But what will happen when user press 'n'?
program will come out of loop and there comes the getch() in picture.
Now if that getch() is not there then the program will come out of loop and terminate, so user will not be able to understand whether it was a normal termination or abnormal termination.
So it is general practice to keep one getch() [as it does not echo input on screen] at the end, which waits for user to press final key for exiting program. This assures user that program behaved normally and terminated properly after pressing 'n'.
Generally programmers have a bye bye message before that getch() which makes that getch() more meaningful. :)
But please understand that this is not compulsory and your program will not be affected even if you remove this.