Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public class Projekt {
  2. public static void main (String[]args) {
  3. //tworze i wypełniam pole
  4. int [][] plansza= new int [23][23];
  5. int counter1=0;
  6. for(int i=0;i<plansza.length;i++) {
  7. for(int j=0;j<plansza[i].length;j++) {
  8. plansza[i][j]=0;
  9. System.out.print(plansza[i][j]);
  10. }
  11. System.out.println();
  12. }
  13.  
  14. //pole zostało stworzone
  15.  
  16. //rozkładam ser
  17. for(int i=0;i<=53;i++) {
  18. for(int j=0;j<plansza[i].length;j++) {
  19. plansza[i][j]=(int)(Math.random()*2 );
  20. }
  21. }
  22.  
  23.  
  24.  
  25. }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement