Programming puzzle
Today's programming puzzle is more of a teaser for kids. Take the following code.
int array [] = new int[10];
for(int i = 0; i < array.length; i++){
.
.
}What is the smallest number of statements you can use, without modulo, to fill the array efficiently so that ones and zeros alternate, giving 1010101010?
Related articles
Related CZ Podcast episodes
- #3 · Java 6 SE, Vývoj webových aplikací
Dagi and Filemon discuss Java 6 and web application frameworks. · Czech audio
- #1 · Vývojová prostředí v Javě
The first CZ Podcast episode looks at Java development environments. · Czech audio