Advertisement
Guest User

Untitled

a guest
Jan 16th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 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 gergonek;
  7.  
  8. /**
  9. *
  10. * @author lakod
  11. */
  12. public class Gergonek {
  13.  
  14. /**
  15. * @param args the command line arguments
  16. */
  17. public static void main(String[] args) {
  18. int[][] kep = {
  19. {1,1,1,1,1},
  20. {0,1,1,1,0},
  21. {0,0,1,0,0},
  22. {0,1,1,1,0},
  23. {1,1,1,1,1},
  24. };
  25.  
  26. for(int y = 0; y < kep.length; y++){
  27. for(int x = 0; x < kep[y].length; x++){
  28. if(kep[y][x] == 0){
  29. System.out.print(" ");
  30. } else{
  31. System.out.print("*");
  32. }
  33. }
  34. System.out.println();
  35. }
  36.  
  37. }
  38.  
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement