[Question]
  [
# Winner: [Aditsu's CJam answer](https://codegolf.stackexchange.com/questions/32267/play-the-bzzt-game/32287#32287)! A whopping 25 bytes! Nice!
You may continue to submit your answer, however you can no longer win. Original post kept for posterity:
---
The "Bzzt" game is a game where you must count to a number (in this case 500). However, if the number has a 3 in it, or is divisible by 3, you don't say the number. Instead, you say "Bzzt".
Rules:
* You can't hard-code the numbers.
* The number only has to satisfy at least 1 of the following requirements
	+ Divisible by 3
	+ Number contains a 3
* Some type of separator is mandatory (12bzzt14 doesn't count)
* Score is measured in bytes.
* You must count exactly to 500, starting at 1 or 0 (you chose).
* The numbers must be output, but it doesn't matter how (e.g., stdout, writing to a text file, etc.).
* 0 can be divisible by 3 or not divisible. You can choose.
* You can output the numbers one at a time (ex, output 1, then 2, then bzzt, then 4, etc) or all at once (e.g., output 1 2 bzzt 4 5).
* You must replace the letter 3 with the word "bzzt". This is not case sensitive (bZzt, Bzzt, bzzt are all okay).
---
* This is a [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") challenge, so the shortest code wins.
* This contest ends June 30th 2014 (7 days from posting).
  
[Answer]
# CJam - 25
```
501{3sI3%<Is-I"bzzt"?N}fI
```
Thanks Howard :)
Try it at <http://cjam.aditsu.net/>
**Explanation:**
`501{…}fI` is basically `for(int I=0; I<501; ++I) {…}`  
`3s` converts 3 to string, i.e. "3"  
`I3%` is `I` % 3  
`<` gets the left substring - `"3".substring(0, I % 3)` - which is "" for `I` % 3 == 0 and "3" otherwise  
`Is` converts `I` to string  
`-` with 2 strings does a set difference, resulting in an empty string iff `I` % 3 == 0 (the first string was empty) or `I` has a 3 digit in it  
`…I"bzzt"?` is like `… ? I : "bzzt"`; the previous string is treated as a boolean value, where "" is false and any other string is true  
`N` adds a newline
[Answer]
## Ruby, 43
```
501.times{|a|puts"#{a}"[?3]||a%3<1?:Bzzt:a}
```
Pretty straightforward.
Edit: Saved one byte, thanks Howard!
[Answer]
# seq and GNU sed - 42 33 31 30
Works directly in dash, some other shells might need to have history expansion disabled, e.g. with bash `set +H`:
```
seq 500|sed 0~3!{/3/!b}\;cbzzt
```
[Answer]
# x86 machine code on DOS (.com file) - 71 bytes
```
00000000  31 c9 68 20 24 89 e5 89  c8 bb 03 00 31 d2 f7 f3  |1.h $.......1...|
00000010  85 d2 74 1a 89 c8 b3 0a  31 d2 f7 f3 80 fa 03 74  |..t.....1......t|
00000020  0d 80 c2 30 86 d6 52 44  85 c0 75 ea eb 08 89 ec  |...0..RD..u.....|
00000030  68 7a 74 68 62 7a 89 e2  b4 09 cd 21 89 ec 41 81  |hzthbz.....!..A.|
00000040  f9 f4 01 7e c2 59 c3                              |...~.Y.|
```
Prints the required output to stdout with space as a delimiter; can be run without problems in DosBox.
Commented assembly:
```
    org 100h
start:
    ; 0 - 500 counter
    xor cx,cx
    ; we'll use the stack as scratch space to build the strings to print
    ; first of all, push ' $' on the stack (in reverse order); this will be
    ; the end of each string we'll print
    push 2420h
    ; save the stack pointer, to get back to this position after each print
    mov bp,sp
mainloop:
    ; first try to divide by three
    mov ax,cx
    mov bx,3
    xor dx,dx
    div bx
    test dx,dx
    ; no remainder => bzzt
    jz bzzt
    ; otherwise, go into the decimal-print loop
    mov ax,cx
divloop:
    ; bh is already at zero due to the mov bx,3 above
    mov bl,10
    xor dx,dx
    ; divide by 10
    div bx
    ; remainder is 3 => bzzt
    cmp dl,3
    je bzzt
    ; convert number to digit
    add dl,'0'
    ; trick: we move the digit to the upper byte of dx: this allows us to
    ; push the whole dx (you cannot do push dl) but to easily kill the
    ; undesidered byte by touching the stack pointer (it will be overwritten
    ; by the next stack operation/ignored by the print)
    xchg dl,dh
    push dx
    inc sp
    ; check is there anything left to print, rinse & repeat
    test ax,ax
    jnz divloop
    ; skip straight to print
    jmp print
bzzt:
    ; since we may be here from inside divloop, reset the stack pointer to
    ; where we left ' $'
    mov sp,bp
    ; push 'bzzt'
    push 747ah
    push 7a62h
print:
    ; print what is on the stack
    mov dx,sp
    mov ah,9h
    int 21h
    ; move us back to ' $'
    mov sp,bp
    ; increment cx and repeat while we are <=500
    inc cx
    cmp cx,500
    jle mainloop
end:
    ; fix back the stack pointer to the original value (=kill the first push)
    pop cx
    ; quit
    ret
```
[Answer]
# Perl - 35 ~~40~~ ~~42~~
```
print$_*!/3/%3?$_:bzzt,$/for 1..500
```
[Answer]
# PHP, no separator - 62, 61,59,58,52,49 47
It doesn't say there should be a space/newline/separator between them, without:
```
while(++$i<501)echo$i%3*!strpbrk($i,3)?$i:bzzt;
```
**With the separator, 68,67,65,64,58/55,53/52 51/50**
```
while(++$i<501)echo$i%3*!strpbrk($i,3)?$i:bzzt,' '; // 51
while(++$i<501)echo$i%3*!strpbrk($i,3)?$i:bzzt,~õ; // 50
```
* Just found a small 'cheat', don't need a space after `echo`, saved me a bit.
* The `~õ` creates a newline
* Another small 'cheat', the bzzt doesn't need quotes (tested it). Not the way to go, but it works.
---
# Javascript - 54,51 50
Same principle, but javascript functions:
```
for(i=0;i++<500;)alert(i%3<1|/3/.test(i)?'bzzt':i)
```
[Answer]
# Javascript 50 49
-1 byte thanks to core1024
```
for(i=0;i++<500;)alert(i%3*!/3/.test(i)?i:'bzzt')
```
[Answer]
### GolfScript, 30 29 characters
```
501,{:^`3`^3%<?)'bzzt'^if n}/
```
Not so straightforward implementation in GolfScript, can be tested [here](http://golfscript.apphb.com/?c=NTAxLHs6XmAzYF4zJTw%2FKSdienp0J15pZiBufS8%3D&run=true).
[Answer]
## Perl, 36
```
print$_%3&&!/3/?$_:Bzzt,$/for 1..500
```
Edit: I'm not a Perl monk, so core1024 seems to have managed to golf another byte out of this in [his answer](https://codegolf.stackexchange.com/a/32275/84).
[Answer]
## C# (71)
Can be directly executed in LinqPad.
```
for(var i=0;++i<501;)(i%3<1|(i+"").Contains("3")?"buzz":i+"").Dump();
```
[Answer]
# Python (52)
Thanks grc!
```
for i in range(501):print[i,'Bzzt'][i%3<1or'3'in`i`]
```
Old version:
```
print['Bzzt'if'3'in`i`or i%3<1 else`i`for i in range(501)]
```
[Answer]
# Haskell: ~~88~~ ~~82~~ ~~80~~ 79
```
main=mapM_ f[1..500]
f n|n`mod`3<1||'3'`elem`show n=putStrLn"bzzt"
f n=print n
```
[Answer]
# JavaScript ~~66~~ ~~63~~ 60
```
for(a=i=[];i<500;)a[i++]=i%3&&!/3/.test(i)?i:'bzzt';alert(a)
```
Thanks to [edc65](https://codegolf.stackexchange.com/users/21348/edc65) for the suggestion to use array. The output will now be comma-separated.
---
## Old versions
### Version 1a - 66
Print from 1 to 500 in an alert box according to the rule. The output is space-separated.
```
a="";for(i=1;i<501;i++)a+=i%3&&!/3/.test(i)?i+" ":"bzzt ";alert(a)
```
### Version 1b - 65
If we consider 0 to be not divisible by 3, we can shorten the solution to 65 character:
```
a=0;for(i=1;i<501;i++)a+=i%3&&!/3/.test(i)?" "+i:" bzzt";alert(a)
```
### Version 2 - 63
```
for(a=i="";i<501;)a+=++i%3&&!/3/.test(i)?i+" ":"bzzt ";alert(a)
```
Thanks to [grc](https://codegolf.stackexchange.com/users/4020/grc) for the suggestion to reduce the length.
[Answer]
## PowerShell, 42
```
1..500|%{($_,'bzzt')[$_-match3-or!($_%3)]}
```
Mostly Ventero's work, with a little help on syntax by me ;-)
[Answer]
## R, 49 characters
```
a=1:500;b='bzzt';a[!a%%3]=b;a[grep(3,a)]=b;cat(a)
```
Explained:
```
a=1:500 #Creates a vector with all integers from 1 to 500
b='bzzt'
a[!a%%3]=b #Replace all multiples of 3 by 'bzzt', thus coercing all other integers to character strings
a[grep(3,a)]=b #Replaces the character strings containing 3 by 'bzzt'
cat(a) #Print to stdout
```
Usage:
```
> a=1:500;b='bzzt';a[!a%%3]=b;a[grep(3,a)]=b;cat(a)
1 2 bzzt 4 5 bzzt 7 8 bzzt 10 11 bzzt bzzt 14 bzzt 16 17 bzzt 19 20 bzzt 22 bzzt bzzt 25 26 bzzt 28 29 bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt 40 41 bzzt bzzt 44 bzzt 46 47 bzzt 49 50 bzzt 52 bzzt bzzt 55 56 bzzt 58 59 bzzt 61 62 bzzt 64 65 bzzt 67 68 bzzt 70 71 bzzt bzzt 74 bzzt 76 77 bzzt 79 80 bzzt 82 bzzt bzzt 85 86 bzzt 88 89 bzzt 91 92 bzzt 94 95 bzzt 97 98 bzzt 100 101 bzzt bzzt 104 bzzt 106 107 bzzt 109 110 bzzt 112 bzzt bzzt 115 116 bzzt 118 119 bzzt 121 122 bzzt 124 125 bzzt 127 128 bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt 140 bzzt 142 bzzt bzzt 145 146 bzzt 148 149 bzzt 151 152 bzzt 154 155 bzzt 157 158 bzzt 160 161 bzzt bzzt 164 bzzt 166 167 bzzt 169 170 bzzt 172 bzzt bzzt 175 176 bzzt 178 179 bzzt 181 182 bzzt 184 185 bzzt 187 188 bzzt 190 191 bzzt bzzt 194 bzzt 196 197 bzzt 199 200 bzzt 202 bzzt bzzt 205 206 bzzt 208 209 bzzt 211 212 bzzt 214 215 bzzt 217 218 bzzt 220 221 bzzt bzzt 224 bzzt 226 227 bzzt 229 bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt 241 242 bzzt 244 245 bzzt 247 248 bzzt 250 251 bzzt bzzt 254 bzzt 256 257 bzzt 259 260 bzzt 262 bzzt bzzt 265 266 bzzt 268 269 bzzt 271 272 bzzt 274 275 bzzt 277 278 bzzt 280 281 bzzt bzzt 284 bzzt 286 287 bzzt 289 290 bzzt 292 bzzt bzzt 295 296 bzzt 298 299 bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt 400 401 bzzt bzzt 404 bzzt 406 407 bzzt 409 410 bzzt 412 bzzt bzzt 415 416 bzzt 418 419 bzzt 421 422 bzzt 424 425 bzzt 427 428 bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt bzzt 440 bzzt 442 bzzt bzzt 445 446 bzzt 448 449 bzzt 451 452 bzzt 454 455 bzzt 457 458 bzzt 460 461 bzzt bzzt 464 bzzt 466 467 bzzt 469 470 bzzt 472 bzzt bzzt 475 476 bzzt 478 479 bzzt 481 482 bzzt 484 485 bzzt 487 488 bzzt 490 491 bzzt bzzt 494 bzzt 496 497 bzzt 499 500
```
[Answer]
# Cobra - 70
```
class P
    def main
        for i in 501,print if('3'in'[i]'or i%3<1,'Bzzt',i)
```
# Batch - 222
Because I genuinely love this language... for some reason...
```
SETLOCAL ENABLEDELAYEDEXPANSION
for /l %%n in (1,1,500) do (
    set a=%%n&set /ai=!a!%%3
    if "!a:~0,1!"=="3" set a=Bzzt
    if "!a:~1,2!"=="3" set a=Bzzt
    if "!a:~2,3!"=="3" set a=Bzzt
    if !i!==0 set a=Bzzt
    echo !a!>>x)
```
[Answer]
# TI-BASIC - 31 ~~(32)(34)(35)(36)(43)~~
```
:While X<500
:X+1→X
:If not(fPart(X/3
:"bzzt
:Disp Ans
:End
Total: 25 + 6 lines = 31
```
Note that most commands on TI-BASIC are represented as single-byte entities.
The code requires X to be initialized to 0 beforehand (otherwise, it's an extra 3 bytes).
I've made several attempts to shave several bytes, so I'm not detailing everything I've done here, as to not clutter the post. They have mostly been directed at shortening the loop, which I've done in this version by a While loop and by shortening the If condition with the help of the `Ans` variable.
[Answer]
# C, 93
Just for the hell of it...
```
main(i){char s[9]="bzzt";while(i<498+sprintf(s+5,"%d",i))puts(s+5*(i++%3&&!strchr(s+5,51)));}
```
[Answer]
# Julia 64 bytes
```
map(x->x%3==0||contains(string(x),"3")?"Bzzt":string(x),[1:500])
```
[Answer]
# cmd.exe - 91
```
for /l %x in (1,1,500)do @set/a %x%3|find "0">nul&&echo bzzt||echo %x|find/v"3"||echo bzzt
```
...because why use a batch file when a perfectly straightforward one-liner exists...:-)
[Answer]
# groovy - 51
```
500.times{println"$it".find('3')||it%3<1?'bzzt':it}
```
edit: using `times` the printing version is now as short as the "displaying". thanks @will-p
[Answer]
# k4 ~~(37)~~ (35)
```
{$(x;`bzzt)(|/51=$x)|~"."in$x%3}'!501
```
`k4` lacks a built-in modulo command, and using the `q` one would take an extra character; this version (ab)uses the built-in output format to check if the string of the result of dividing `x` by 3 has a decimal point in it.
EDIT:
```
{$(x;`bzzt)(|/51=$x)|x=3*_x%3}'!501
```
Clever as matching the decimal point may be, I can shave two bytes by checking that `3*floor x%3` is still `x`.
[Answer]
# C, 80
Using spaces as separators instead of line breaks.
```
n;main(){for(;n++<500;)printf(n%10^3&&n/10%10^3&&n/100^3&&n%3?"%d ":"bzzt ",n);}
```
[Answer]
## Mathematica, 54 Characters
This feels too straightforward. Shorter solutions must be possible.
```
If[DigitCount[#][[3]] > 0 || #~Mod~3 < 1, Bzzt, #] & /@ Range@500
```
[Answer]
# T-SQL 2008 - 80
Not going to win or anything but fun none the less:
Tweaked thanks to @domager:
```
declare @ int=0t:if(@)like'%3%'or @%3=0print'bzzt'print @;set @+=1if @<501goto t
```
A little known fact, @ is a valid name for a variable. It feels weird as the set based code is the more SQL variant, but shorter is shorter! This version works on any database.
Edit:
I was able to remove two of the semis as they were not needed. I'm pretty sure this is as optimal as it gets.
Edit2:
Never say never. Here it's now even grosser using goto, but it allows us to avoid the block. We can Replace while,begin,end with the shorter if,t:,goto saving 6 characters. We also rearrange statement by rewriting the loop as a pseudo do-while,semantically equivalent.
Edit3:
Yeah, somehow if is now shorter.
Original:
```
select top 501iif(number like'%3%'or number%3=0,'bzzt',str(number))from spt_values where'p'=type
```
Must be run on the master database.
I love T-SQL despite its noisy and ugly ways. There might be a way to make this simpler, but unfortunately, the `iif` built-in requires both sides agree on types. Sql servers precedence rules give int higher precedence than strings. Number is also really long, but aliasing is more characters than it is worth. There might be a better way to turn number in to a string.
Edit: str works too. 2 less characters than ltrim
[Answer]
# VBA: 54
```
for x=0to 500:?iif(x/3=x\3=instr(1,x,3),x,"Bzzt"):next
```
Open up your favorite Office program, hit alt+F11 to open the VBA IDE and paste the code into the immediate pane and press enter.
In VBA, : is the line separator, ? is shorthand for print, iif means inline if (think x?"Y":"N"), x/3 does floating point division and x\3 does integer division, instr returns the position of a char in a string, or 0 otherwise, true=-1 and false=0.
The code basically increments x and outputs x if x/3=x\3=instr(1,x,3) is true and "Bzzt" otherwise. x/3=x\3 compares (float)(x/3) to (int)(x/3) and returns a boolean (0 is false and -1 is true). instr(1,x,3) returns 0 if "3" is not in the number, and a positive integer otherwise. The only time the expression returns true is when (x/3=x\3) is false (0) and instr(1,x,3) is 0, or in other words, when x is not divisible by 3 and does not contain the digit "3", which is exactly what we are looking for.
[Answer]
# Bash, ~~53 52 48~~ 46
```
seq 500|factor|sed '/3.*:\| 3 */cBzzt
s/:.*//'
```
Requires GNU sed (uses the `c` extension).
[Answer]
**Java, 142 131**
thank to WozzeC suggestion
```
public class a{public static void main(String[]a){for(int i=1;i<501;i++)System.out.println(i%3>0&(""+i).indexOf(51)<0?i:"bzzt");}}
```
[Answer]
# R (40) (36)
*This is basically [plannapus](https://codegolf.stackexchange.com/a/32291/18915) answer a little bit shortened, but I can not comment yet*
*Update: -4 characters (see plannapus's comment)*
```
a=1:500;a[grepl(3,a)|!a%%3]='bzzt';a
```
Output:
```
  [1] "1"    "2"    "bzzt" "4"    "5"    "bzzt" "7"    "8"    "bzzt" "10"   "11"   "bzzt" "bzzt" "14"   "bzzt" "16"   "17"   "bzzt" "19"   "20"   "bzzt" "22"   "bzzt" "bzzt" "25"   "26"   "bzzt" "28"   "29"   "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "40"   "41"   "bzzt" "bzzt" "44"   "bzzt" "46"   "47"   "bzzt" "49"   "50"   "bzzt" "52"   "bzzt" "bzzt" "55"   "56"   "bzzt" "58"   "59"   "bzzt" "61"   "62"   "bzzt" "64"   "65"   "bzzt" "67"   "68"   "bzzt" "70"   "71"   "bzzt" "bzzt" "74"   "bzzt" "76"   "77"   "bzzt" "79"   "80"   "bzzt" "82"   "bzzt" "bzzt" "85"   "86"   "bzzt" "88"   "89"   "bzzt" "91"   "92"   "bzzt" "94"   "95"   "bzzt" "97"   "98"   "bzzt" "100"  "101"  "bzzt" "bzzt" "104"  "bzzt" "106"  "107"  "bzzt" "109"  "110"  "bzzt" "112"  "bzzt" "bzzt" "115"  "116"  "bzzt" "118"  "119"  "bzzt" "121"  "122"  "bzzt" "124"  "125"  "bzzt" "127"  "128"  "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "140"  "bzzt" "142"  "bzzt" "bzzt" "145"  "146"  "bzzt" "148"  "149"  "bzzt" "151"  "152"  "bzzt" "154"  "155"  "bzzt" "157"  "158"  "bzzt" "160"  "161"  "bzzt" "bzzt" "164"  "bzzt" "166"  "167"  "bzzt" "169"  "170"  "bzzt" "172"  "bzzt" "bzzt" "175"  "176"  "bzzt" "178"  "179"  "bzzt" "181"  "182"  "bzzt" "184"  "185"  "bzzt" "187"  "188"  "bzzt" "190"  "191"  "bzzt" "bzzt" "194"  "bzzt" "196"  "197"  "bzzt" "199"  "200"  "bzzt" "202"  "bzzt" "bzzt" "205"  "206"  "bzzt" "208"  "209"  "bzzt" "211"  "212"  "bzzt" "214"  "215"  "bzzt" "217"  "218"  "bzzt" "220"  "221"  "bzzt" "bzzt" "224"  "bzzt" "226"  "227"  "bzzt" "229"  "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "241"  "242"  "bzzt" "244"  "245"  "bzzt" "247"  "248"  "bzzt" "250"  "251"  "bzzt" "bzzt" "254"  "bzzt" "256"  "257"  "bzzt" "259"  "260"  "bzzt" "262"  "bzzt" "bzzt" "265"  "266"  "bzzt" "268"  "269"  "bzzt" "271"  "272"  "bzzt" "274"  "275"  "bzzt" "277"  "278"  "bzzt" "280"  "281"  "bzzt" "bzzt" "284"  "bzzt" "286"  "287"  "bzzt" "289"  "290"  "bzzt" "292"  "bzzt" "bzzt" "295"  "296"  "bzzt" "298"  "299"  "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "400"  "401"  "bzzt" "bzzt" "404"  "bzzt" "406"  "407"  "bzzt" "409"  "410"  "bzzt" "412"  "bzzt" "bzzt" "415"  "416"  "bzzt" "418"  "419"  "bzzt" "421"  "422"  "bzzt" "424"  "425"  "bzzt" "427"  "428"  "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "bzzt" "440"  "bzzt" "442"  "bzzt" "bzzt" "445"  "446"  "bzzt" "448"  "449"  "bzzt" "451"  "452"  "bzzt" "454"  "455"  "bzzt" "457"  "458"  "bzzt" "460"  "461"  "bzzt" "bzzt" "464"  "bzzt" "466"  "467"  "bzzt" "469"  "470"  "bzzt" "472"  "bzzt" "bzzt" "475"  "476"  "bzzt" "478"  "479"  "bzzt" "481"  "482"  "bzzt" "484"  "485"  "bzzt" "487"  "488"  "bzzt" "490"  "491"  "bzzt" "bzzt" "494"  "bzzt" "496"  "497"  "bzzt" "499"  "500"
```
[Answer]
# Fortran - ~~118 114~~ 111
A hopelessly unlikely candidate, though originally developed to fit on punch cards. Using all the obscure constructs from the past, some short code may still be written:
```
do3 i=1,500
j=i
if(mod(i,3))2,1,2
1 print*,'bzzt'
cycle
2 goto(1)mod(j,10)-2
j=j/10
if(j>0)goto2
3 print*,i
end
```
The "computed goto" `goto(L1,L2,...,Ln) x` branches to one of the labels L if and only if 1 <= x <= n.
**Edit:** Managed to shave off 4 bytes by rearranging the loop that checks for the digit 3. As a bonus, the code now also contains the arithmetic if-statement `if(x) a,b,c`, which always branches to one of three labels: a if x < 0, b if x == 0 or c if x > 0.
Unfortunately, the first two versions did not produce the correct output. The digit-3 loop now works correctly, and the code now also includes a modern logical if-statement. Three more bytes are gone, because who needs an `enddo` statement? The output may be verified [here](http://ideone.com/2GKoX8).
]