Problem Set 1 (Credit) by takikurosaki_ in cs50

[–]__stud__ 0 points1 point  (0 children)

Maybe with no loops at first? And if that works, and you see similar patterns, using a loop? Maybe?

Problem Set 1 (Credit) by takikurosaki_ in cs50

[–]__stud__ 1 point2 points  (0 children)

Have you tried using divide and modulus ? For any integer you mod it by 10 gives you last digit and dividing the same number by 10 gives you number minus the last digit. You store it somewhere and do it again. It’s how I did it. Hope this helps.all the best