Originally Posted by
ArkM
Well, it's so simple. You have integers in range 2..12. Declare an array of integers with size 13 (you may use indicies from 0 to 12). Initialize it with zeroes then add 1 to array[sum] element in the simulation main loop.
Use rand() with a proper scaling to get values in range 1..6 (see rand help, use RAND_MAX value).
That's all.
Of course, you are familiare with basic C++ declarations and statements...
I think im getting confused when it says to /* Write a declaration of array exprected here. Assign an initializer list containing the expected values here. Use SIZE for the number of elements */
is that asking for
int expected[ SIZE ] = { list containing expected values }
I guess im not sure what the expected values are, I posted the sample output to the lab and it has the expected values, but there in percentages and im not sure if thats what im suppose to list.