fukchai2000
01-26-2005, 05:54 PM
I've posted b4...and terribly sorry about the last post...hope you can help me out again.....:(
ok...here what i trying to do: (sorry for didn't post it in the begining)
public class roll{
public static void main(String args[]){
int face;
for (int i=0;i<6;i++)
{
face = (int)(Math.random()*6)+1;
System.out.println(face);
}
}
this code will print out a random number from 1 - 6 (probably same number will be printed out twice......)
what i actually want is .....make sure that each number only being printed once.....hope you guys can help me out
thanks a lot.........
ok...here what i trying to do: (sorry for didn't post it in the begining)
public class roll{
public static void main(String args[]){
int face;
for (int i=0;i<6;i++)
{
face = (int)(Math.random()*6)+1;
System.out.println(face);
}
}
this code will print out a random number from 1 - 6 (probably same number will be printed out twice......)
what i actually want is .....make sure that each number only being printed once.....hope you guys can help me out
thanks a lot.........