• Post Reply Bookmark Topic Watch Topic
  • New Topic

reading the original number from right to left  RSS feed

 
Vital Jays
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A three-digit number is given. The  task is to print the number obtained by reading the original number from right to left.
I  made  this  task in two different  ways:
First:


Second:


I don't like the  second solution. Would  you  be  so kind to help me somehow to rewrite  the  code in order to  recieve result 531;
Many thanks  in  advance.
 
Vital Jays
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank  you. I  have  found  how  to  do  this
 
Knute Snortum
Sheriff
Posts: 4287
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for posting your solution.
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you enhance that to a number of any length?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!