initialize random number generatorinfinite loop initialize sum to zero for i in [0..NUMBERS) generate random number add number to sum print number to console save current time as t1 take input from user save current time as t2 if user input is correct calculate the difference between t2 and t1 as dt print congratulations and dt to console else print game over message break out of the infinite loop
As long as you enter the correct answer, you can play another round. If you enter the wrong answert, the game quits.