- #1
NDiggity
- 54
- 0
Homework Statement
The question is a dice is rolled to decide a stock's value. So it can either go up or down, and can change in value by .05,.10 and .20. We need to first write a function that will roll a dice and report how much the stock will change by. Then in the main part of the program, we need to roll a dice to see which of the 6 stocks are affected, and then call the function to see how much it is changed by. We are supposed to do this five times and then print out the results of the six stocks(which are in an array).
The Attempt at a Solution
My problem is when I print out the array, the values havn't changed. What am I doing wrong. I'll paste my code here, and thanks for helping!
http://cpp.tastethepaste.org/1469