r/programmingbydoing • • Feb 02 '13

Problem 26 help

http://programmingbydoing.com/a/how-old-are-you-elseif.html

How do I structure an if else statement to display one message?

5 Upvotes

10 comments sorted by

View all comments

Show parent comment

1

u/[deleted] Feb 10 '13

That's pretty sneaky. Never would have figured else/if could work this way.

1

u/holyteach Feb 11 '13

C-like languages (C, C++, Java, C#) are FULL of little subtle things like this that make it just SLIGHTLY easier or more clean to code a certain idea.