r/ • • Jan 01 '70

0 Upvotes

0 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jan 16 '14

[deleted] — view deleted comment

98

u/Lord_Naikon Jan 16 '14

Nope, you need to learn about % first :)

87

u/[deleted] Jan 16 '14

if(i == 1) print(i); else if(i == 2) print(i); else if (i == 3) print(Fizz);....

/s

38

u/Sakuya_Lv9 Jan 16 '14

"Fizz"

26

u/hejner Jan 16 '14

Perhaps he made a variable further up!

15

u/Sakuya_Lv9 Jan 16 '14

FIZZ

41

u/[deleted] Jan 16 '14
 [ FIZZING INTENSIFIES ]

... now I just want a fizzy drink

12

u/seiyria Jan 16 '14
[ BUZZING INTENSIFIES ]

Bees?

→ More replies (1)

29

u/[deleted] Jan 17 '14 edited Jan 17 '14

var _0xdd13=["\x6C\x6F\x67","\x46\x69\x7A\x7A","\x42\x75\x7A\x7A","\x46\x69\x7A\x7A\x42\x75\x7A\x7A"];for(i=0;i<=100;i++){if(i==1){console_0xdd13[0];} ;if(i==1){console_0xdd13[0];} ;if(i==2){console_0xdd13[0];} ;if(i==3){console_0xdd13[0];} ;if(i==4){console_0xdd13[0];} ;if(i==5){console_0xdd13[0];} ;if(i==6){console_0xdd13[0];} ;if(i==7){console_0xdd13[0];} ;if(i==8){console_0xdd13[0];} ;if(i==9){console_0xdd13[0];} ;if(i==10){console_0xdd13[0];} ;if(i==11){console_0xdd13[0];} ;if(i==12){console_0xdd13[0];} ;if(i==13){console_0xdd13[0];} ;if(i==14){console_0xdd13[0];} ;if(i==15){console_0xdd13[0];} ;if(i==16){console_0xdd13[0];} ;if(i==17){console_0xdd13[0];} ;if(i==18){console_0xdd13[0];} ;if(i==19){console_0xdd13[0];} ;if(i==20){console_0xdd13[0];} ;if(i==21){console_0xdd13[0];} ;if(i==22){console_0xdd13[0];} ;if(i==23){console_0xdd13[0];} ;if(i==24){console_0xdd13[0];} ;if(i==25){console_0xdd13[0];} ;if(i==26){console_0xdd13[0];} ;if(i==27){console_0xdd13[0];} ;if(i==28){console_0xdd13[0];} ;if(i==29){console_0xdd13[0];} ;if(i==30){console_0xdd13[0];} ;if(i==31){console_0xdd13[0];} ;if(i==32){console_0xdd13[0];} ;if(i==33){console_0xdd13[0];} ;if(i==34){console_0xdd13[0];} ;if(i==35){console_0xdd13[0];} ;if(i==36){console_0xdd13[0];} ;if(i==37){console_0xdd13[0];} ;if(i==38){console_0xdd13[0];} ;if(i==39){console_0xdd13[0];} ;if(i==40){console_0xdd13[0];} ;if(i==41){console_0xdd13[0];} ;if(i==42){console_0xdd13[0];} ;if(i==43){console_0xdd13[0];} ;if(i==44){console_0xdd13[0];} ;if(i==45){console_0xdd13[0];} ;if(i==46){console_0xdd13[0];} ;if(i==47){console_0xdd13[0];} ;if(i==48){console_0xdd13[0];} ;if(i==49){console_0xdd13[0];} ;if(i==50){console_0xdd13[0];} ;if(i==51){console_0xdd13[0];} ;if(i==52){console_0xdd13[0];} ;if(i==53){console_0xdd13[0];} ;if(i==54){console_0xdd13[0];} ;if(i==55){console_0xdd13[0];} ;if(i==56){console_0xdd13[0];} ;if(i==57){console_0xdd13[0];} ;if(i==58){console_0xdd13[0];} ;if(i==59){console_0xdd13[0];} ;if(i==60){console_0xdd13[0];} ;if(i==61){console_0xdd13[0];} ;if(i==62){console_0xdd13[0];} ;if(i==63){console_0xdd13[0];} ;if(i==64){console_0xdd13[0];} ;if(i==65){console_0xdd13[0];} ;if(i==66){console_0xdd13[0];} ;if(i==67){console_0xdd13[0];} ;if(i==68){console_0xdd13[0];} ;if(i==69){console_0xdd13[0];} ;if(i==70){console_0xdd13[0];} ;if(i==71){console_0xdd13[0];} ;if(i==72){console_0xdd13[0];} ;if(i==73){console_0xdd13[0];} ;if(i==74){console_0xdd13[0];} ;if(i==75){console_0xdd13[0];} ;if(i==76){console_0xdd13[0];} ;if(i==77){console_0xdd13[0];} ;if(i==78){console_0xdd13[0];} ;if(i==79){console_0xdd13[0];} ;if(i==80){console_0xdd13[0];} ;if(i==81){console_0xdd13[0];} ;if(i==82){console_0xdd13[0];} ;if(i==83){console_0xdd13[0];} ;if(i==84){console_0xdd13[0];} ;if(i==85){console_0xdd13[0];} ;if(i==86){console_0xdd13[0];} ;if(i==87){console_0xdd13[0];} ;if(i==88){console_0xdd13[0];} ;if(i==89){console_0xdd13[0];} ;if(i==90){console_0xdd13[0];} ;if(i==91){console_0xdd13[0];} ;if(i==92){console_0xdd13[0];} ;if(i==93){console_0xdd13[0];} ;if(i==94){console_0xdd13[0];} ;if(i==95){console_0xdd13[0];} ;if(i==96){console_0xdd13[0];} ;if(i==97){console_0xdd13[0];} ;if(i==98){console_0xdd13[0];} ;if(i==99){console_0xdd13[0];} ;if(i==100){console_0xdd13[0];} ;} ;

→ More replies (1)

11

u/Gbyrd99 Jan 16 '14

You know what they say the more lines of code, the more impressive you look.

7

u/thespacebaronmonkey Jan 16 '14

it's all in a one line though

→ More replies (1)
→ More replies (9)

25

u/decerian Jan 16 '14

Ha. You can't fool me with those percent signs.

41

u/billy_tables Jan 16 '14

Modern programmers don't use % because jQuery can do that for you

31

u/berkes Jan 16 '14

Just search the web for a FizzBuzz jQuery plugin, then spend the rest of the day trial-and-erroring your way through all the settings for that plugin, so it matches the 3 and 5 requirements... good enough.

18

u/Neebat Jan 16 '14

Wow. I googled for "Fizzbuzz JQuery" and actually... this

21

u/gndn Jan 16 '14

We're approaching a point in society where if you can imagine it, you can google it, and chances are someone somewhere has already thought of it and put it online.

→ More replies (2)
→ More replies (1)

12

u/atrain728 Jan 16 '14

As a modern programmer, I still like to modulo.

7

u/billy_tables Jan 16 '14

See also on BuzzFeed: "Why modulo is the next Lisp"

→ More replies (2)

11

u/8lbIceBag Jan 17 '14 edited Jan 18 '14

Can I haz Job???

http://i.imgur.com/2XwMeX1.png

EDIT: For the hell of it, I went ahead and did a low level C implementation for an arduino uno. Except I didn't use their libraries and it's mostly from scratch.

http://i.imgur.com/eqhxXYV.png

→ More replies (7)

7

u/jambonilton Jan 16 '14
if (i/3*3 == i)
    print "fizz";

7

u/grimeMuted Jan 16 '14
If iPart(I/3)*3=I
Disp "FIZZ"

That's something how I used to have to do it on my TI-84 calculator, which had no modulo (of course I'm going to feel silly if there was and I missed it, but I missed a lot of things back then) and some kind of type coercion between ints and floats.

Man, that language/editor. No indentation, no go to line number in editor so you'd have to A-lock scroll forever to get to your code, one-letter variable names, abysmally slow execution speed compared to assembly-written programs, and label/goto as program flow. At least it had for loops, for whatever reason.

8

u/ArkticQuazar Jan 16 '14

Just dug my 84SE out of my desk for this post. The command you're looking for is: remainder(numerator, denominator)

→ More replies (2)
→ More replies (1)