Computer Science, asked by laxmikarua07, 9 months ago

10. Write a Java program which will accept any integer positive four digit number from user by using [12]
Scanner class. Reverse it from middle and display the new number.
for example: input: Enter a four digit integer number = 4251
output: the reversed new number is = 5142​

Answers

Answered by samkalin
1

There are three ways to reverse a number in Java.

1) Using while loop

2) Using for loop

3) Using recursion

4) Reverse the number without user interaction

1 Input your number and press enter:

145689

Reverse of input number is: 986541

2 Input your number and press enter:

56789111

Reverse of specified number is: 11198765

Answered by deepab98
0

hey you punk

don't answer my questions if you don't know

shall I report your id to the moderator?

Similar questions