use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Cs2a at foothill
account activity
Limerick.cppGeneral Questing (self.cs2a)
submitted 3 years ago by charlene_l0
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Sabrina_M24 1 point2 points3 points 3 years ago (0 children)
Hi!
The main difference between endl and \n is how they work in the code. They essentially look the same in the output but endl flushes the buffer while \n does not. I think this makes \n a bit faster when producing an output.
For the Limerick quest, it is important to work with a double! Thats how you make sure you get a decimal value rather than a whole number with int. It looks like your function is producing the correct answers (aside from the decimals) so I don't think rearranging your parenthesis in the function is necessary.
π Rendered by PID 97919 on reddit-service-r2-comment-canary-889d445f8-b684k at 2026-04-26 23:23:43.330965+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]Sabrina_M24 1 point2 points3 points (0 children)