bool m = LOW;
bool n = LOW;
int seznam[5]= {};
void setup() {
// put your setup code here, to run once:
randomSeed(analogRead(A0));
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
int static maks = 0;
if(m==LOW){
for(int x=0;x<5;x++){
int stevilo = random(1,11); //1,2,3,4,5,6,7,8,9,10
seznam[x] = stevilo;
if (maks < stevilo) maks = stevilo;
Serial.println(seznam[x]);
delay(500);
}
Serial.println("___________________________________");
Serial.println("Največje število: ");
Serial.println(maks);
}
m=HIGH;
if (n==LOW){
for(int y=4; y>=0; y--){
Serial.println(seznam[y]);
}
n==HIGH;
}
}