Do the summing using an array and then you can print the contents of the array.
Did you ever design the program (make a list of the steps)?
What are the steps the posted code does to solve the...
Type: Posts; User: Norm
Do the summing using an array and then you can print the contents of the array.
Did you ever design the program (make a list of the steps)?
What are the steps the posted code does to solve the...
Before coding anything make a list of the steps (a design) the program should do to solve the problem.
When you have a design then work on coding it.
If there is only one roll, how do you compute the %? Normally there are 1000s of rolls.
Before you said the user would chose which sum of the dice the % was to be computed for.
I don't think...
Not sure I understand what you mean by 1 roll.
If a 2 is rolled then a 2 is rolled 1/1 = 100% of the time.
Is the problem: What % of rolls produces a value given by the user? The number of rolls to make is also given by the user.
Not sure what the first loop (for(sum)) is supposed to do. Can you explain why sum starts at 2 and goes to 4?
That sounds like the dice should be rolled 1000s of times, each diceSum counted and...