It's a nice answer! It satisfies the normal rules (no if or ?:)
if
?:
Thanks for taking the time to submit a solution!
Thanks for the reply. I think re-submission is also allowed. So, here is a C++ solution, which again, may not satisfy all your conditions.
string fizzbuzz(int n){ string num_string = to_string(n); string all_options[5][3] = { {"FizzBuzz" ,"Buzz" , "Buzz"}, {"Fizz" , num_string, num_string}, {"Fizz" , num_string, num_string}, {"Fizz" , num_string, num_string}, {"Fizz" , num_string, num_string} }; return all_options[n%5][n%3]; }
Well done! I think you've got a solution
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It's a nice answer! It satisfies the normal rules (no
if
or?:
)Thanks for taking the time to submit a solution!
Thanks for the reply. I think re-submission is also allowed. So, here is a C++ solution, which again, may not satisfy all your conditions.
Well done! I think you've got a solution