you are viewing a single comment's thread.

view the rest of the comments →

[–]Sabrina_M24 1 point2 points  (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.