Ask the user to press any key.
Display any 3 random space-separated digits between 0-9 e.g. 6 2 7
.
If any of them is 7
, output "Congratulations!"
.
Else, output "Try again! Better luck next time."
.
Repeat. See Variants.
-
Only show congratulations if at least two of the generated numbers are
7
. -
Only show congratulations if all three of the generated numbers are
7
. -
Only show congratulations if all three of the generated numbers are even numbers e.g.
0
,2
,4
or6
. -
Only show congratulations if all three of the generated numbers are odd numbers e.g.
1
,3
,5
or7
.