dorbird icon

Hamster 2 Aufgabe 2b

dorbird | PRO | 10/31/13 03:18:23 PM UTC | 0 ⭐ | 146 👁️ | Never ⏰ | []
Java |

400 B

|

None

|

0 👍

/

0 👎

int zaehler=0;
 
void main() {
    sammleAllesBiszurWand();
    
}
void sammle(){
    while (kornDa()){
         nimm();
         zaehler=zaehler+1;         
    }
}
void sammleAllesBiszurWand(){
    while(vornFrei()){
         sammle();
         if(vornFrei()){
            vor(); 
         }
    }
    if((zaehler % 2)==0){ 
       while(!maulLeer()){
           gib();
      }
    }
}

Comments