for (total=2; total<=numbThrows; total++)
Okay, for the code above, I replaced the numbThrows with a 12.
for (total=2; total<=12; total++)
This seemed to fix the problem with the 13 occurring...
Type: Posts; User: Nuggets
for (total=2; total<=numbThrows; total++)
Okay, for the code above, I replaced the numbThrows with a 12.
for (total=2; total<=12; total++)
This seemed to fix the problem with the 13 occurring...
import java.util.*;
public class DiceSim {
public static void main(String[] args) {
Scanner Input = new Scanner(System.in);
int[] frequency = new int [13]; //Declares the array
int...
Removing frequency[total] helped , as it got rid of those numbers. But then it added a 13 to the output. Do you know where that 13 came from?
Before with frequency[total] -
2: 2**
3: 5*****
4:...
Can anyone help me?
I think the problem lies in this line..
System.out.print(
" " + total + ": " + frequency[total] + " ");
This code is for a dice simulator. Rolling 2 dice and printing out the results in the form of a histogram. The code runs fine. It's just that I don't want to see the number percentages with the...