public class Lab6_3_1 { public static void main(String[] args) { int total1 = 0; int total2 = 0; int total3 = 0; int total4 = 0; int total5 = 0; int total6 = 0; for(int k = 0; k<100; k++) { int x = (int)(Math.random()*6)+1; if(x==1) total1 ++; if(x==2) total2 ++; if(x==3) total3 ++; if(x==4) total4 ++; if(x==5) total5 ++; if(x==6) total6 ++; } System.out.println("sum is 1 = " + total1); System.out.println("sum is 2 = " + total2); System.out.println("sum is 3 = " + total3); System.out.println("sum is 4 = " + total4); System.out.println("sum is 5 = " + total5); System.out.println("sum is 6 = " + total6); } }