samples[i] = ( 4.4 * analogRead(tempPin) * 100.0) / 1024.0; // conversion math of LM35 sample to readable temperature and stores result to samples array. 1024 is the Bit depth (quantization) of Arduino.
// 5 is the supply volts of LM35. Change appropriatelly to have correct measurement. My case is 4.4Volts.
If your Arduino is operating at 4.4 volts, it's either damaged or needs new batteries powering it. It should be at very close to 5.0 V or 3.3 V, depending on which Arduino you have.
int randomArray[100]; //Intentionally long to store up to 100 inputs (doubtful anyone will get this far)
int inputArray[100];
That's 400 bytes of the 2048 that you have available.
for (int y=turn; y <= turn; y++)
{ //Limited by the turn variable
How many times is this going to loop?
i tried it combine but it only works 1 step by 1 step i dunno how to do the loop together
You need to do more than say that you are frustrated. You need to say exactly what the code does, and does not, do.