Any one correct my errors? | SoloLearn: Learn to code for FREE!

0

Any one correct my errors?

https://code.sololearn.com/cUNbH96G15wB/?ref=app

10/26/2020 3:26:16 PM

Atul Panda

9 Answers

New Answer

+1

I have used Break statement

+1

There you have it 👍🏾

0

Your while loop is infinite

0

ok thats fixed, but since that while loop doesn’t involve the variable n, then a while loop is not needed.

0

So what could be done?

0

Don't know about do while plz tell using while loop

0

Thomas Atul Panda if youre trying to literally reverse the number: if(n>0){ rem = t%10; t = t/10; rev = rem + t //rev is initialized as 0 so you cant use (rev*10) or you’ll get 0. } with this if I use 17 for example I get 71 for reverse. I used 37 and it didn’t work but don’t know why 🤷🏾‍♂️

0

i suggest learning a little more of the Java course before continuing.

0

Can you suggest a utube channel for loops?