SHARE
TWEET

Untitled

a guest Feb 17th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Main
  2.     {
  3.       int[] Pesel(String[][] gowno)
  4.      {
  5.         int[] chuj= new int[gowno[0].length()];
  6.         for(int i=0; i<gowno[0].length(); i++ )
  7.         {
  8.             String xd = gowno[0][i];
  9.             char[] c = xd.toCharArray();
  10.             int[] nana= new int[c.length()];
  11.            
  12.             for(int j =0; j<c.length(); j++)
  13.             {
  14.             nana[j]=Character.getNumericValue(c[j]);
  15.             }
  16.             int wynik= nana[0] + nana[1]*3 + nana[2]*7 + nana[3]*9 + nana[4] + nana[5] *3 + nana[6] *7+ nana[7]*9 + nana[8] + nana[9] * 3+ nana[10];
  17.            
  18.             chuj[i] = wynik;
  19.            
  20.             if(wynik%10=0)
  21.             {
  22.                 gowno[1][i]="POPRAWNY";
  23.             }
  24.             else
  25.             {
  26.                 gowno[1][i]="BŁEDNY";
  27.             }
  28.         }
  29.         return chuj[];
  30.      }
  31.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top