有10个数字(1,2,3,4,5,6,7,8,9,10) 取出一个 x,判断取出哪个数字答:java代码:public static void main(String[] args) {//由于指定了数字池,所以先存放到一个数组里面int[] numPool = {1,2,3,4,5,6,7,8,9,10};Random rd = new Random();int rn = (rd.nextInt(10));//随机生成0-9的数字作为下标System.out.println("随机取一个数字x...");int...
怎么用php自动生成一个26位字符串答:"S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2","3", "4", "5", "6", "7", "8", "9");charsLen = count($chars) - 1;shuffle($chars);output = "";for ($i=0; $i<$len; $i++){ output .= $chars[mt_rand(0, $charsLen)];} ret...