write a java program input a number check ehether it is a palprime number or not
Answers
Answered by
0
Answer:
import java.util.Scanner;
public class KboatDigitReverse
{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter Number: ");
int orgNum = in.nextInt();
int copyNum = orgNum;
int revNum = 0;
while(copyNum != 0) {
int digit = copyNum % 10;
copyNum /= 10;
revNum = revNum * 10 + digit;
}
int diff = revNum - orgNum;
System.out.println("Reversed Number = " + revNum);
System.out.println("Absolute Difference = " + Math.abs(diff));
}
Explanation:
please mark me as brainliest
Similar questions
Math,
6 months ago
Math,
6 months ago
CBSE BOARD XII,
6 months ago
Social Sciences,
1 year ago
Biology,
1 year ago
Science,
1 year ago