Re:Printing 1 to 1000 without loop or conditionals
by mhb on Monday January 03, 2011 @12:32AM
(#2062223)
printf("1 10 11 100 101 110 111 1000");
[ Parent
| on HN ]
Re:Printing 1 to 1000 without loop or conditionals
by jws on Monday January 03, 2011 @01:06AM
(#2062297)
puts("10111000");
They are all in there, you just have to look a little.
Re:Printing 1 to 1000 without loop or conditionals
by Avshalom on Monday January 03, 2011 @09:35AM
(#2063215)
To do it in base 10
puts("1000200300400500600700800901101201301401501601701801902102202302402502602702802903103203303403503603703803904104204304404504604704804905105205305405505605705805906106206306406506606706806907107207307407507607707807908108208308408508608708808909109209309409509609709809911121131141151161171181191221231241251261271281291321331341351361371381391421431441451461471481491521531541551561571581591621631641651661671681691721731741751761771781791821831841851861871881891921931941951961971981992223224225226227228229233234235236237238239243244245246247248249253254255256257258259263264265266267268269273274275276277278279283284285286287288289293294295296297298299333433533633733833934434534634734834935435535635735835936436536636736836937437537637737837938438538638738838939439539639739839944454464474484494554564574584594654664674684694754764774784794854864874884894954964974984995556557558559566567568569576577578579586587588589596597598599666766866967767867968768868969769869977787797887897987998889899900");