Re-write the above two line as follows:
Serial.print((int)5.0 * val * 100 / 1024); //please see note at bottom regarding this formula.
int temp = (int)(5.0 * val * 100 / 1024);
Re-write the above two line as follows:
Serial.print((int)5.0 * val * 100 / 1024); //please see note at bottom regarding this formula.
int temp = (int)(5.0 * val * 100 / 1024);