Voltem’s proposed solution is horribly wrong. Shockingly, each line of code, except for the braces, is questionable. And it’s only 10 lines of code.
#include <stdlib.h> . Old style header. The new form is <cstdlib> . However, it isn’t necessary here.
#include <iostream.h> . Old style header. The new form is <iostream> .
main(). Won’t compile. Only two acceptable forms of main. The one without arguments is int main().
kbhit. conio.h function. However, conio.h is compiler dependent, and has no standardisation. No good.
delay(100). Another conio.h function. That’s right, it doesn’t exist in cstdlib. And by relying on conio.h, you rely on a specific compiler.
Again, the correct way to insert a “pause” is to make the respective thread “sleep”. This is OS dependent. Also, because desktop operating systems are not real time OS, the sleep value is a minimum rather than a precise pause.