198
submitted 1 year ago* (last edited 1 year ago) by andioop@programming.dev to c/programming_horror@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] Vex_Detrause@lemmy.ca 4 points 1 year ago
#You are an input. You have value! You matter!
if number % 2 == 0
  return "number is even" (is_num_even = 1 or true)
else
  return "number is odd" (is_num_even = 0 or false)

Am I doing it right? /S.

[-] PoolloverNathan@programming.dev 5 points 1 year ago

Don't put nbsps in code blocks, they show up literally.

this post was submitted on 07 Dec 2023
198 points (100.0% liked)

Programming Horror

1891 readers
2 users here now

Welcome to Programming Horror!

This is a place to share strange or terrible code you come across.

For more general memes about programming there's also Programmer Humor.

Looking for mods. If youre interested in moderating the community feel free to dm @Ategon@programming.dev

Rules

Credits

founded 2 years ago
MODERATORS