Please help me I'm having trouble writing this code:

1) Generate random exam score in the range of [0,200] for 11 students and stores it in an array of doubles.

how to create a random array?

Any help would be much appreciated. Thanks

Printable View

- 09-29-2011, 04:45 AMvanilla88HELP! not sure how to create random Array
Please help me I'm having trouble writing this code:

1) Generate random exam score in the range of [0,200] for 11 students and stores it in an array of doubles.

how to create a random array?

Any help would be much appreciated. Thanks - 09-29-2011, 10:08 AMPetrRe: HELP! not sure how to create random Array
Use Random class.

- 09-29-2011, 02:01 PMNormRe: HELP! not sure how to create random ArrayQuote:

how to create a random array

Then use the Random class to assign a random score to each student's slot. - 09-30-2011, 10:10 AMFlyNnRe: HELP! not sure how to create random Array
Here's some pseudo code to get you started:

Declare variable to hold total count of students;

Declare an EMPTY array of type double. Dont forget make it size 10;

Run a for loop while count<stud_array.length(){

inside the for loop generate the random value and add it to the array;

}