Hi everyone. I'm still new to programming and now I have some issue on the array So now, I had copied some example code for random+ing number in a certain range. Then I tried to write some code that store the random number in the array and then can use it in later on (doing some arithmetic with the stored number). But it always failed. Can someone please help me to solve the issue? Thanks!
On line 22 you call function random() and transfer its return value directly into cout. You do want to store the value into a named variable and use the variable later.
You do ask: How to set the value of an array element?