![]() |
.. (לתיקייה המכילה) | |
How do I generate random numbers? | |
First use srand(time(0)) and then rand(). Also look at tutorial 7. |
How can I make the program stop and wait for any key after printing to the screen "Press any key to continue"? | |
You can remove the printing and the waiting for any key. When the player plays the program will do him move and also the computer's move and then print again that this is the player's turn. No need to print "Press any key to continue". Also when the player inserts wrong input you should print the warning and allow the player to do another move, without printing "Press any key to continue". |
Can I use 2 - dimensional array? | |
No. You need to use 1 - dimensional array. One goal of this question is to exercise using 1 - dimensional array. |