Click here to Skip to main content
15,356,641 members
Please Sign up or sign in to vote.
1.00/5 (4 votes)
See more:
I want to know how to write the code

What I have tried:

I did not reach an effective result
Posted
Updated 19-Jul-20 13:30pm
v2

On paper, think about how you go about reversing a number.

You can do this using nothing but math, or you could do it using strings.

But, in any case, we're not going to do it for you. Your big problem is going to be YOU have to explain how the code works, so YOU have to come up with the way to do it.
   
Take 12345.
A division by 10 gives 1234 and the reminder is 5.
The operation modulo gives the reminder of a division.
This is all what you need.
   
Comments
BillWoodruff 21-Jul-20 0:26am
   
voted #1: an absurd response to an obvious homework question.
Patrice T 21-Jul-20 3:43am
   
Ok, noted, at least you have the courage to leave a comment.
Only gave a lead to solution as it is an obvious homework.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900