Basic Question for new Java Student

后端 未结 4 1687
挽巷
挽巷 2021-01-28 13:01

I am very new to Java and I have no other programming experience. I am struggling with a homework question and I have only gotten so far. I am very sure this question is very s

4条回答
  •  青春惊慌失措
    2021-01-28 13:11

    Reverse of 123 is 321 Observe that 123 = 100*1 + 10*2 + 1*3 and 321 = 1*1 + 10*2 + 100*3

    How do you split 123 in 1,2,3? How do you iterate through all the digits?
    Are you familiar with loop constructs? Do you know what division remainder is?

提交回复
热议问题