write a java program to input three digit integer number and reverse it. pls pls don't scam
Answers
Answered by
0
Answer:
import java.util.Scanner;
class ReverseNumber
{
public static void main(String args[])
{
int n, reverse = 0;
System.out.println("Enter an integer to reverse");
Scanner in = new Scanner(System.in);
n = in.nextInt();
while(n != 0)
{
reverse = reverse * 10;
reverse = reverse + n%10;
n = n/10;
}
System.out.println("Reverse of the number is " + reverse);
}
}
Explanation:
Answered by
1
Answer:
Similar questions
Hindi,
3 months ago
Biology,
3 months ago
Social Sciences,
6 months ago
Computer Science,
11 months ago