CodeAbbey / meta

For issues and perhaps some other stuff
0 stars 0 forks source link

Quadratic Equation fails when given a correct solution #82

Closed HornMichaelS closed 1 year ago

HornMichaelS commented 1 year ago

Thanks for your work on this website! It's been fun to work through.

Just wanted to report that I'm getting a "Wrong" message on Quadratic equation, even though the answer I've given is identical to the expected answer. See attached screenshots:

Screen shots ![Screen Shot 2022-11-11 at 7 23 29 PM](https://user-images.githubusercontent.com/6050603/201454163-422f705d-32b1-45a3-9195-2a977a7b8e4c.png) ![Screen Shot 2022-11-11 at 7 19 23 PM](https://user-images.githubusercontent.com/6050603/201454165-a6a2aea6-789e-4aab-8a27-328ce89155fe.png)
HornMichaelS commented 1 year ago

I found it's due to the fact that I wasn't explicitly printing the '-' in front of a negative imaginary component, but rather allowed the printf function to automatically add the sign when the imaginary component was negative. Explicitly printing a hyphen instead got my submission accepted.

Must be that a different character is used to represent unary negation.