Hi, I am a total beginner here. I am trying to write a program where I have to generate a 6x6 arrays (36 in all) , and then automatically generate a random integers and assign them into all 36 arrays. And then print it out in a 6x6
The range is from 1 to 9999, and that all 36 numbers has to be unique to each other (no duplicates in the 36 numbers).
The following is what I have so far, so I really need some assistance to help me with what's wrong and how to rectify it.
(I am using for loop to go through all the numbers)
your main function does not have a body: int main() {}
Note that the main function is the function that's called when starting the program.
So in your main function you will want to call the function generateArray
You have to declare generateArray before main so move main to the bottom of your code.
furthermore you pass a parameter to generateArray with the same name as your global variable so it won't modify the global, but the local array.
Since you pass by value you don't save the array anywhere.