java tutorial
Download Android Codes From SkyBlueAndroid
Sunday, 17 June 2012
Random number in java
find 5 random numbers with in 100
class randomnumber
{
public static void main(String args[])
{
for(int i=1;i<=5;i++)
{
System.out.println((int)(Math.random()*100));
}
}
}
output
12
13
67
88
34
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment