this post was submitted on 09 Oct 2025
774 points (99.1% liked)

Programmer Humor

28388 readers
844 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] SmoothLiquidation@lemmy.world 12 points 3 months ago

As other people mentioned, things like the decimal structure works well, but you can also just use an int to store how many pennies something costs and convert it to dollars for display.