, , , , .
, , , , - . 10 6 10 :
import java.util.Random;
public class Stuff {
public static void main(String[] args) {
Random rand = new Random();
int[] freqs = new int[] {6,8,11,15,25,27,29,33,48,50,55,60,62,70,75,77,78,84,86,88,93,94,96,97,99,100};
int numWords = 10;
for(int i = 0; i<numWords; i++)
{
String word = "";
int numLetters = 6 + rand.nextInt(5);
for(int j = 0; j<numLetters; j++)
{
int freq = rand.nextInt(100) + 1;
int index = 0;
while(freqs[index] < freq) index++;
word = word + (char)(97 + index );
}
System.out.println(word);
}
}
, - , ?
JB