12.07.2015 Views

CSCI 102

CSCI 102

CSCI 102

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Exercise‣ Write a program that– Defines a function that accepts an integer, N as input and thengenerates an array of N random integers and returns it to the caller– From main ask the user for N, call your function and "store" thereturn result– Iterate over the array returned by your function and average thevalues.– Print that average…is that value close to _______________(expected value)?© Copyright 2013 Brent Nash & Mark Redekopp, All Rights Reserved11

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!