int temperaturas[] = {25, 27, 22, 30, 28};
void setup() {
Serial.begin(9600);
int tempMax = temperaturas[0];
int tempMin = temperaturas[0];
for (int i = 1; i < 5; i++) {
if (temperaturas[i] > tempMax) {
tempMax = temperaturas[i];
}
if (temperaturas[i] < tempMin) {
tempMin = temperaturas[i];
}
}
Serial.print("Temperatura maxima: ");
Serial.println(tempMax);
Serial.print("Temperatura minima: ");
Serial.println(tempMin);
}
void loop(){
}