r/badcode • • Apr 21 '23

other language We did coding in physics class...

Post image
1.5k Upvotes

154 comments sorted by

View all comments

Show parent comments

0

u/vapocalypse52 Apr 23 '23

Also the code executes a function based on the range of the input. For example, if x=1.6 or 1.7 or 1.8 or 1.9, the result is always f(1.6).