Viewing a response to: @bandli/re-reggaemuffin-introducing-the-coding-challenge-20170817t194047303z
I think your result needs to be initialized, because on 5 your have `null + "Buzz"`. I'm not a c# person so I don't know if that implicitly works. Kudos for test cases, that is worth a tip! I suggest you test a few negative numbers and multiples of 3 and 5, maybe `[-21, -25, -3, -15, 35, 33]`. Maybe a c# person can chip in but I like this solution :)
author | reggaemuffin |
---|---|
permlink | re-bandli-re-reggaemuffin-introducing-the-coding-challenge-20170817t194717153z |
category | coding-challenge |
json_metadata | {"tags":["coding-challenge"],"app":"steemit/0.1"} |
created | 2017-08-17 19:47:21 |
last_update | 2017-08-17 19:47:21 |
depth | 2 |
children | 2 |
last_payout | 2017-08-24 19:47:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 355 |
author_reputation | 37,964,839,695,531 |
root_title | "Introducing the Coding Challenge" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 12,114,956 |
net_rshares | 0 |
It works, I have test cases to prove it :) On a serious note, here's a quote from C# language specification: **"If an operand of string concatenation is null, an empty string is substituted."** I also added tests for mentioned numbers and it seems to work fine (-21 returns "Fizz", 35 returns "Buzz", etc.). Thanks for your feedback!
author | bandli |
---|---|
permlink | re-reggaemuffin-re-bandli-re-reggaemuffin-introducing-the-coding-challenge-20170817t200437680z |
category | coding-challenge |
json_metadata | {"tags":["coding-challenge"],"app":"steemit/0.1"} |
created | 2017-08-17 20:04:36 |
last_update | 2017-08-17 20:04:36 |
depth | 3 |
children | 1 |
last_payout | 2017-08-24 20:04:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 339 |
author_reputation | 1,950,997,435 |
root_title | "Introducing the Coding Challenge" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 12,116,163 |
net_rshares | 0 |
Interesting, that is a pretty cool feature. Thank you for pulling out the specifications 😊
author | reggaemuffin |
---|---|
permlink | re-bandli-re-reggaemuffin-re-bandli-re-reggaemuffin-introducing-the-coding-challenge-20170818t052920379z |
category | coding-challenge |
json_metadata | {"tags":["coding-challenge"],"app":"steemit/0.1"} |
created | 2017-08-18 05:29:21 |
last_update | 2017-08-18 05:29:21 |
depth | 4 |
children | 0 |
last_payout | 2017-08-25 05:29:21 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 90 |
author_reputation | 37,964,839,695,531 |
root_title | "Introducing the Coding Challenge" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 12,147,376 |
net_rshares | 0 |