package work; import java.util.*; public class Work { public static void main(String args[]) { Map m = new HashMap (); Random r = new Random(); int b; float s=0; m.put("Іванчук", (int) 0); m.put("Кравченко", (int) 0); m.put("Лавринчук", (int) 0); m.put("Лунгу", (int) 0); m.put("Марченко", (int) 0); m.put("Міцкевич", (int) 0); m.put("Мустафаєв", (int) 0); m.put("Петефі", (int) 0); m.put("Терпилихо", (int) 0); m.put("Хоткевич", (int) 0); for(Map.Entry i : m.entrySet()) { b=1+r.nextInt(12); s +=b; m.put(i.getKey(), b); System.out.println(i.getKey()+" : "+i.getValue()); } s=s/m.size(); System.out.println("\nСередній бал: "+s+"\n"); for(Map.Entry i : m.entrySet()) if (i.getValue()>s) System.out.println(i.getKey()+" : "+i.getValue()); } }