Computer Science, asked by rkashyapeashaan, 11 months ago

Write an algorithm and a flowchart for a Java program for finding whether a number is palindrome or not​

Answers

Answered by shanvi83
1

Answer:

import java.util.*;

class palindrome {

public static void main(String args[]){

Scanner sc= new Scanner(System.in);

System.out print on(" enter the number->");

int n=sc.nextint();

int d,r,c;

r=0;c=n;

do{

d=c%10;

r=r*10+d;

n=n/10;

}while(n!=0);

if(c==r)

System.out.println("The number "+ n +" is a palindrome number);

else

System.out.println(" The number "+ n +" is not a palindrome number);

}

}

This is the program for palindrome number.and algorithm and flowchart can me done while seeing this.

hope it helps

Similar questions