Hello, I was wondering if there's a way to place two arrays in one loop. For example, say I had an integer and double array of the same size, let's say 30. I want to place 30 random values in each of them in one loop, and then display each value for both of them in a second loop.
^ How would I put the double in there as well?Code:int setArray[30]; srand(time(0)); int i; for (i=0; i < 30; i++) { int r = rand ( )%31; setArray[i] = r; }
Thanks!