Free help with homework

Why join Brainly?

  • ask questions about your assignment
  • get answers with explanations
  • find similar questions


Instead of storing it as an int, store it as a string, an array of char.  Then, add the its digits using a loop.  Oh, and don't forget to use atoi before operatinf if you want to right.  atoi means alpha to integer, it converts your char type number to an int one

Hope this helps :)
p.s. If there is a part of my solution that you did not understand, please do not hesitate to contact me and I'll be more than glad to explain it to you thoroughly
0 0 0
The Brain
  • The Brain
  • Helper
Not sure about the answer?
Learn more with Brainly!
Having trouble with your homework?
Get free help!
  • 80% of questions are answered in under 10 minutes
  • Answers come with explanations, so that you can learn
  • Answer quality is ensured by our experts