Advertisement
Lusien_Lashans

Laba1 ввод

Mar 24th, 2018
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.12 KB | None | 0 0
  1. import java.util.HashMap;
  2. import java.util.Map;
  3.  
  4. public class Main {
  5.  
  6.     public static void main(String[] args) {
  7.         int count = 6;
  8.  
  9.         int[][] arr;
  10.  
  11.         arr = new int[][]{
  12.                 {2,3,0},
  13.                 {1,4,0},
  14.                 {1,0},
  15.                 {2,0},
  16.                 {6,0},
  17.                 {5,0},
  18.         };
  19.  
  20.         EnteringArray(count, arr);
  21.         FillDictionary(dictionary, count);
  22.  
  23.         System.out.println(" ");
  24.         System.out.println(dictionary.toString());
  25.     }
  26.  
  27.         public static void EnteringArray(int count, int[][] arr){
  28.             for (int i=0; i<count; i++){
  29.                 System.out.println(" ");
  30.                 for(int j=0; j<arr[i].length; j++){
  31.                     System.out.print(arr[i][j]);
  32.                 }
  33.             }
  34.         }
  35.  
  36.         public static void FillDictionary(Map<Integer, Boolean> dictionary, int count){
  37.             for (int i=1; i<=count; i++){
  38.                 dictionary.put(i,false);
  39.             }
  40.         }
  41.  
  42.         public  static Map<Integer, Boolean> dictionary = new HashMap<Integer, Boolean>();
  43.  
  44.  
  45.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement