Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Phlindrom {
- public static Scanner in = new Scanner(System.in);
- public static void main(String[] args) {
- int moses;
- for(int i =1;i<10000000;i++){
- System.out.println("Give 3 Digit number");
- moses = in.nextInt();
- int a = moses/100;
- int b = moses%10;
- if(a==b){
- System.out.println("Palindrome");
- }
- else{
- System.out.println("Not Palindrome");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement