To Find A Palladrom Number

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)
 {                                      
                R.setText("");
        int N = Integer.parseInt(t1.getText());
        int a1 = N;
        int q,r;
     
        while (N!=0)
        {
            q= N/10;
            r=N%10;
            N=q;
            R.append(""+r);
        }
          int C = Integer.parseInt(R.getText());
              if (C==a1)
                  R.setText("A Palladrom Number");
              else
                   R.setText("Not a Palladrom Number");


Comments

Popular posts from this blog

Xtra Care Hospital Bill Generator

Net Beans Program to Generate Prime No. upto a Limit

Net Beans Program to Find Factorial of A number