/script>
[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Fizzbuzz

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 8
Thread images: 3

File: cruz.jpg (1MB, 3840x5760px) Image search: [Google]
cruz.jpg
1MB, 3840x5760px
Show me your Fizzbuzz and what language its in!

Heres mine in Python:

def int_to_fizzbuzz(i):
entry = ''
if i%3 == 0:
entry += "fizz"
if i%5 == 0:
entry += "buzz"
if i%3 != 0 and i%5 != 0:
entry = i
return entry

fizzbuzz = [int_to_fizzbuzz(i) for i in range(1, 100)]

print(fizzbuzz)


rate & hate plz
>>
>>54917003

python:

import memes
memes.fizzbuzz(1, 100)
>>
>whitespace-determined language
>not using code blocks
cruz control 4 retarded, m8?
>>
>>54917003
python:
for i in range(1,101):
print("FizzBuzz"[i*i%3*4:8--i**4%5] or i)
>>
Rust
fn main() {
for x in 1..100 {
match (x % 3, x % 5) {
(0, 0) => println!("FizzBuzz"),
(0, _) => println!("Fizz"),
(_, 0) => println!("Buzz"),
(_, _) => println!("{}", x)
}
}
}
>>
ES6:
[...Array(100).keys()].map((i)=>(i+1)).map((i) => i%15 == 0 ? 'FizzBuzz' : i%3 == 0 ? 'Fizz' : i%5 == 0 ? 'Buzz' : i )
>>
File: 1464840525229.jpg (43KB, 556x561px) Image search: [Google]
1464840525229.jpg
43KB, 556x561px
>>54917003
>Using two logical tests instead of else
Your Fizzbuzz confirms you as retarded.
>>
File: 1367674314793.jpg (31KB, 313x286px) Image search: [Google]
1367674314793.jpg
31KB, 313x286px
fizz
buzz
fizzbuzz

>English
Thread posts: 8
Thread images: 3


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.