![]() |
![]() |
|
|
|||||||
| Programmierung Rat & Tat für Programmierer |
|
|
Themen-Optionen | Ansicht |
|
|
#2 |
|
Inventar
![]() Registriert seit: 13.06.2001
Beiträge: 1.830
|
Probier's mal mit
Code:
int j=0; //j ist die Variable mit der das Array durchlaufen wird
for(int i=0;i<n; i++){ //i dient dazu, daß das Array nur einmal durchlaufen wird
j+=s; //Kurz für j=j+s;
if(j>=n){j-=n;} //Damit j nicht über das Array hinausläuft
System.out.println(kinder[j]);
}
Würde trotzdem empfehlen EPROG ordentlich zu machen, du wirst es brauchen... Jak
____________________________________
Join the DNRC | Godwin\'s Law (thx@stona) Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing. \"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra) |
|
|
|
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
|
|