Advertisement
Nakumas

Egzamin PP&JP: 2019, Zad.1 D // Druga wersja

Mar 3rd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package xddddd;
  7.  
  8. /**
  9.  *
  10.  * @author Szymek
  11.  */
  12. public class Xddddd {
  13.  
  14.     /**
  15.      * @param args the command line arguments
  16.      */
  17.     public static void main(String[] args) {
  18.         // TODO code application logic here
  19.     }
  20.    
  21.     int[] PESEL(String[][] tab2d)
  22.     {
  23.         int[] tab1d = new int[tab2d.length];
  24.         int wartosc;
  25.         String pesel;
  26.        
  27.        
  28.         for (int i = 0; i < tab2d.length; i++)
  29.         {
  30.             pesel = tab2d[i][0];
  31.             wartosc = pesel.charAt(0) + 3*pesel.charAt(1)+3*pesel.charAt(2); //itd, nie chce mi sie pisac tego calego
  32.             if(wartosc%10 == 0)
  33.                 tab2d[i][1] = "POPRAWNY";
  34.             else tab2d[i][1] = "BÅ‚Ä™DY";
  35.            
  36.             tab1d[i] = wartosc;
  37.            
  38.         }
  39.        
  40.         return tab1d;
  41.        
  42.        
  43.     }
  44.    
  45.    
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement