I have an assignment due for a C class which utilizes an array of [5][5] with an initial starting point of [2][2]. You begin with a figure located in the cell, [2][2] of the array. The object is to generate a random number (using the rand () function) and add this number to the initial array position, thus moving the object to a new location on the array board (similar to chess). You must then loop this function over again until the object falls outside the scope of the array. Once outside the scope, the process begins once again (for 1000 loops) and then the averages of the objects presence on each cell, and the average number of steps that it took the object to fall off, are to be printed to screen in table format.
HEELLLPPPP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Where in the hell do I begin?
So far I have the rand () function written and understand the "human" logic behind it, but have no earthly idea how to translate into C language.
Can you help me?