Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
kamen69955yYeah, I've seen this smartass-ery before. I guess it depends on the teacher's mood whether they'll give you an A for that or whether they'll add the small detail that you should take input for the size of the "square" too.
-
asgs115635yHe used preincrement operator to ensure the loop does run exactly once assuming he was in a dilemma about what the postfix would do
-
increasing obscurity and number of lines in many case is good as can justify cost increases to the customer...
Related Rants
Technically it ain't wrong
joke/meme
works on my machine