Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (anonymous):

how to make this program if a five-digit number is input through the keyboard, write a program to reverse the number.

OpenStudy (anonymous):

What Language? In java: \\enter a send a string as a parameter, then return it's reverse. public String reverse(String number) { \\It's easiest if you use a string instead of a int. String answer = ""; for(int i = number.length-1; i>=0; i--) { \\gets the last char of number and adds it to answer. Then it moves down to the next char answer.concat(number.substring(i)); } return answer; } That should work. I didn't test it,

OpenStudy (anonymous):

Is it C or C++ or Java

OpenStudy (anonymous):

the program in c is attached here

OpenStudy (anonymous):

My answer was in java.

OpenStudy (anonymous):

if u want to do this program in java simply use reverse method, it will be easy..

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!