(int) (Math.random() * 100) % 6 + 1
(int)(Math.random()*5+1;
public class Test{
public static void main(String[] args){
for(int i=0; i<5; i++){
int x = (int)(Math.random()*6)+1;
System.out.println(x);
}
}
}
public class RandomOut {
public static void main(String [] args){
for(int i=0;i<5;i++){
int tmp=(int)(Math.random()*6)+1;
System.out.println(tmp);
}
}
}
※ 0<=Math.random()<1