Guest User

Untitled

a guest
May 27th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. public static void main(String[] args) {
  2. int arr[][] = {{0, 0, 0},
  3. {0, 0, 1},
  4. {0, 1, 0},
  5. {0, 1, 1},
  6. {1, 0, 0},
  7. {1, 0, 1},
  8. {1, 1, 0},
  9. {1, 1, 1}};
  10.  
  11. for (int zeile = 0; zeile < arr.length; zeile++) {
  12. if (arr[zeile][0] == 1 && arr[zeile][1] == 1 && arr[zeile][2] == 0 || arr[zeile][0] == 1 && arr[zeile][1] == 0 && arr[zeile][2] == 1 || arr[zeile][0] == 0 && arr[zeile][1] == 1 && arr[zeile][2] == 1) {
  13. System.out.println("Zeile "+zeile +" ist 1");
  14. }
  15.  
  16. }
  17. }
Add Comment
Please, Sign In to add comment