Reversing last n digits of an Integer in C

后端 未结 0 585
后悔当初
后悔当初 2020-12-17 20:23

I need to write a program that takes 2 digits(X and n) and then prints X with last n digits of X reversed.

For example

Input: 12345 3

Output: 12543

相关标签:
回答
  • 消灭零回复
提交回复
热议问题