Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Esame{
- public static boolean[][] e1(int[][] a){
- if(a!=null){
- boolean perogniA;
- boolean[][] b=new boolean[a.length][];
- for(int i=0; i<a.length; i++){
- b[i]=new boolean[a[i].length];
- }
- for(int i=0; i<a.length; i++){
- for(int j=0; j<a[i].length; j++){
- perogniA=true;
- for(int x=0; perogniA&&x<=i; x++) {
- for(int y=0; perogniA&&y<=j&&y<a[x].length; y++){
- perogniA=a[x][y]%2==0;
- }
- }
- b[i][j]=perogniA;
- }
- }
- return b;
- }
- else return null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement