This is a discussion on Homework help within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by arsenalftw067 the program now shows how many times I rolled each number but no th It doesn't ...
Not the percentage of each rolled number
I see. You use expressions like this:
The major issue is that since both times_rolled and num3 (but numN in general applies to this) are integers, integer division takes place. If you want an answer other than zero, you need to cast one of the dividing terms to say, float, to yield percentages.
So I would have to have the num1 num2 etc all in floats?