random number between 0 and 2
===============================
import java.math.*;
public class k
{
public static void main(String a[])
{
Double k;
k=Math.random()*1000;
int s=k.intValue();
s= s%3;
System.out.println(" s is "+s);
}
}
Monday, September 7, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment