Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2. public class Phlindrom {
  3.  
  4. public static Scanner in = new Scanner(System.in);
  5.     public static void main(String[] args) {
  6.         int moses;
  7.         for(int i =1;i<10000000;i++){
  8.     System.out.println("Give 3 Digit number");
  9.         moses = in.nextInt();
  10.         int a = moses/100;
  11.         int b = moses%10;
  12.         if(a==b){
  13.             System.out.println("Palindrome");
  14.         }
  15.         else{
  16.         System.out.println("Not Palindrome");  
  17.             }
  18.        
  19.         }
  20.  
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement