CAN

123
Last edited on
Please note that this is not a homework site. We won't do your homework for you. The purpose of homework is that you learn by doing. However we are always willing to help solve problems you encountered, correct mistakes you made in your code and answer your questions.

We didn't see your attempts to solve this problem yourself and so we cannot correct mistakes you didn't made and answer questions you didn't ask. To get help you should do something yourself and get real problems with something. If your problem is "I don't understand a thing", then you should go back to basics and study again.


You can use an array, but it is not mandatory. You do have to perform those multiplications somehow. After all, you wan't to compute 2^63.

There is a small catch; you have to know your limits. See http://www.cplusplus.com/reference/limits/numeric_limits/

19 }
Last edited on
What do you mean by "not working"? Compile error, runtime crash or unexpected results?

Did you read the "limits" material that I did link to?
Please do NOT delete your posts once you've got an answer. It makes the thread useless as a learning resource for other readers.

Please edit your posts again to put back the content you deleted.
Topic archived. No new replies allowed.