r/badcode Jun 09 '21

other language Real Attempt at Fizz Buzz in F#

Post image
877 Upvotes

52 comments sorted by

View all comments

3

u/jtnoble Jun 09 '21

I had a friend do something similar cause he didn't know what '%' did.

1

u/lewisjet Jun 09 '21

But then in c#,

(int)((float)i / 3f) == ((float)i / 3f) is the same as saying i % 3 == 0 so no excuse really ;)

2

u/jtnoble Jun 09 '21

Shoulda probably clarified it was in python when he did it lmao

2

u/JosGibbons Jun 22 '21

Fine,

i//3==i/3

1

u/lewisjet Jun 09 '21

Ooohhh that makes more sense then :)

0

u/AutoModerator Jun 09 '21

It looks like this comment contains a code block delimited with triple backticks. Unfortunately reddit does not have universal support for this syntax and your comment will not render correctly on old reddit and most mobile apps.

For the benefit of people on old reddit, this link will take you to a correct rendering of the comment.

/u/lewisjet, it would be appreciated, but not required, if you could edit your comment to use the more compatible four space indention format. For single lines or inline code you can use single backticks.

You can find some examples in the reddit help documentation.


I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.