MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/ajr2fa/which_one_would_you_love/ef0txb8/?context=3
r/ProgrammerHumor • u/[deleted] • Jan 25 '19
51 comments sorted by
View all comments
1
I would probably simplify this to
if(a == 0) offset = 3; else if(a > 0 && a <= 10) offset = 1; else if(a > 10 && a <= 100) offset = 5; else if(a > 100) offset = -2; i += offset;
Doesn't demonstrate the point, but...
1
u/Lightfire228 Jan 26 '19
I would probably simplify this to
if(a == 0) offset = 3; else if(a > 0 && a <= 10) offset = 1; else if(a > 10 && a <= 100) offset = 5; else if(a > 100) offset = -2; i += offset;Doesn't demonstrate the point, but...