Monday, September 7, 2009

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);
}

}

No comments:

Post a Comment