test3.4

来源:互联网 发布:方媛开的淘宝店铺 编辑:程序博客网 时间:2024/06/05 18:13
/*target:try to calculate speed
 * methods:make distance float ,time integer
 */
import java.util.*;
public class Test4 {
public static void main(String[] args) {
Random rand=new Random();
int time=rand.nextInt(60);
float dis=rand.nextFloat();
System.out.println("Speed ="+dis/time);
}
}
0 0
原创粉丝点击