package test;
import java.math.*;
public class test {
public static void main(String[] args) {
// TODO Auto-generated method stub
int c1=0;
int c2=0;
int c3=0;
int c4=0;
int c5=0;
int c6=0;
for(int i=1;i<=100;i++)
{
int s=(int)(Math.random()*6)+1;
if(s==1)
c1+=1;
if(s==2)
c2+=1;
if(s==3)
c3+=1;
if(s==4)
c4+=1;
if(s==5)
c5+=1;
if(s==6)
c6+=1;
System.out.println("随机数:"+s);
}
System.out.println("出现1概率:"+c1+"%");
System.out.println("出现2概率:"+c2+"%");
System.out.println("出现3概率:"+c3+"%");
System.out.println("出现4概率:"+c4+"%");
System.out.println("出现5概率:"+c5+"%");
System.out.println("出现6概率:"+c6+"%");
}
}