ambiguity | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

ambiguity

I’m really stuck at this point about whats wrong in my code and how can I correct … and would be very glad if supported with some sort of help.( C++ ) https://sololearn.com/compiler-playground/c204Nc9AbJxq/?ref=app

25th Sep 2023, 12:02 PM
Khushi Swami
2 Answers
+ 3
Do you understand the error it is giving you? Line 16 has a problem with the use of "%" (modulo). This is used to find the >remainder of division<. The instructions in the comments of your code are telling you to find the >difference< of the total price of all the notebooks you can afford and your balance ie: balance - total price of notebooks
25th Sep 2023, 12:43 PM
Aaron Lee
Aaron Lee - avatar
+ 1
Okayy… I think now I get it , probably my method to get the solution was right, but apparently it wasn’t what they wanted as the solution…as there can be many solutions to the trouble… but they wanted to teach that particular method for the solution. Anyways, now I have got it right and thank you very much Mr. Aaron Lee for helping a kid in its coding journey… Thanks a lot…
28th Sep 2023, 6:13 AM
Khushi Swami