Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

5 replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/

C, 9086 81

i,s;main(){while(++i<501)sprintf(&s,"%d",i),puts(i%3&&!strchr(&s,51)?&s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answerbacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

Edit: down to 81 characters incorporating edc65's sick trick from the comments (assumes int is at least 32 bits). Thanks!

C, 9086 81

i,s;main(){while(++i<501)sprintf(&s,"%d",i),puts(i%3&&!strchr(&s,51)?&s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

Edit: down to 81 characters incorporating edc65's sick trick from the comments (assumes int is at least 32 bits). Thanks!

C, 9086 81

i,s;main(){while(++i<501)sprintf(&s,"%d",i),puts(i%3&&!strchr(&s,51)?&s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

Edit: down to 81 characters incorporating edc65's sick trick from the comments (assumes int is at least 32 bits). Thanks!

4 Incorporated edc65's trick.

C, 908686 81

i;maini,s;main(){char s[4];whilewhile(++i<501)sprintf(s&s,"%d",i),puts(i%3&&!strchr(s&s,51)?s&s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

Edit: down to 81 characters incorporating edc65's sick trick from the comments (assumes int is at least 32 bits). Thanks!

C, 9086

i;main(){char s[4];while(++i<501)sprintf(s,"%d",i),puts(i%3&&!strchr(s,51)?s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

C, 9086 81

i,s;main(){while(++i<501)sprintf(&s,"%d",i),puts(i%3&&!strchr(&s,51)?&s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

Edit: down to 81 characters incorporating edc65's sick trick from the comments (assumes int is at least 32 bits). Thanks!

3 better golfing

C, 8990 86

i;main(){char s[4];while(++i<501){sprintf(s,"%d",i);puts(,puts(i%3&&!strchr(s,51))?s:"bzzt");}}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. I also As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

C, 89

i;main(){char s[4];while(++i<501){sprintf(s,"%d",i);puts((i%3&&!strchr(s,51))?s:"bzzt");}}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. I also used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

C, 90 86

i;main(){char s[4];while(++i<501)sprintf(s,"%d",i),puts(i%3&&!strchr(s,51)?s:"bzzt");}


Not a serious contender. This is essentially bacchusbeale's answer golfed better, as I suggested in comments to his answer. As well as those changes, I used strchr as a shorter test than a for loop to see if the string version of the integer contains the character 3 (character 51 in ASCII).

2 strchr is short but not fast. :-)
1