for loop iterated only once I have written a little project, it works so far as it should but the for loop is only iterated once, then the result is displayed on the LCD.

#include &lt;LiquidCrystal.h&gt;  
#include &lt;stdlib.h&gt;
const int Contrast=20;
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);  
const int led = A5;
const int button = A3;


void setup() {
  Serial.begin(9600);
analogWrite(6,Contrast); 
lcd.begin(16, 2); 

pinMode(led, OUTPUT);
digitalWrite(led,LOW);
pinMode(button, INPUT_PULLUP); 
}

void loop() {



unsigned long mittelwert = 0;

for(int i=0; i&lt;10; i++){
  unsigned long r = random(1,5000);
  unsigned long now = millis();    


  digitalWrite(led,HIGH); 

  while (digitalRead(button) == HIGH){  
    lcd.setCursor(0,0);
    lcd.print("druecken");
  }
  mittelwert = mittelwert + millis() - now; 
  digitalWrite(led, LOW);  //LED aus


}


lcd.clear();
lcd.setCursor(0,0); //setze Cursor auf 1.Stelle in der 1. Zeile
lcd.print(mittelwert/1000);
lcd.setCursor(0,1);
lcd.print("Sekunden");

delay(5000);
lcd.clear();



}
Your button is configured as an input with a pullup.  Therefore, except when the button is depressed to ground that input, this nested loop

while (digitalRead(button) == HIGH){  
   lcd.setCursor(0,0);
   lcd.print("druecken");
}


will endlessly repeat, preventing execution from advancing.

Given that your question fails to state what you are hoping to accomplish it's not possible to make any corrective recommendations.  If you do want to make use of the button, you should probably first search and read the existing questions here having to do with debouncing.