Here is the concerning part of the code:
Originally Posted by CommonTater
Here, it generates arrays like sort[-1] or sort and prints random values for them. I don't want this. I want it to print the ones that are between sort and sort. Is my problem clear now? Is there a way to do this?
for(a=1; a<=machines; a++)
printf(" %d machine: %d, %d, %d, %d\n", a, sort[number-a], sort[number+a-(2*machines)-1], sort[number-a-(2*machines)], sort[number-(4*machines)+a-1]);
They're not randomly created, the problem is their indexes are changeable. There are functions inside the index part of the array, so there I am getting thing like a[-1] too as a result of the function inside and I don't want them to be printed with random values that system generates. I posted my part of code, so you can see there. Can I eliminate them?
Originally Posted by \007