How does it work. No need for input just prints random number.
Extending it. The program is extendable. This is a basic concept of c++ and can be used in any program. Go extend it.
Explanation. 1. Include ‘iostream.h’ and ‘conio.h’ and ‘stdlib.h’ files. 2. Add void main. 3. Start program by first clearing the screen. 4. Add a for loop. 5. Add cout to print number. 6. Get character.
At the end You learnt creating the C++ program for generating random number. So now enjoy the program.
P.S. If you have any questions, click here to join our community and feel free to ask any questions.