View Full Version : Pseudocode need HELP?

05-02-2004, 06:57 PM

Can anyone help me create an array code that generates 50 random numbers.


so far i done this but its not working.

arrayName= new ArrayType [sizeOfArray];
sizeOfArray = 50;
double [] numbers = {9,1,3,10,10,5,6,50,45,39,1,2,3,5,10,11,13,29,20,21,21,21,10,40,9,15,27,27,30,29,4,49,50,50,13,14,15 ,1,2,2,2,2,2,7,3,14,4,5,6,7};

05-02-2004, 07:56 PM
not sure what language you're using, but the only real difference between each language will be variable declaration and random number generation.
the for loop is the key here though.

int total_rands = 50;
Array random = new Array[total_rands];
for (int i=0; i<total_rands; i++) {
random[i] = random_number_var;

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum