I wrote a code to simulate a die rolling 3600 times and it works and everything, but we're supposed to use a void function in it, which I did not, simply because I don't know what part of my code should be in the void function, please help me out.
edit: No he didn't give an indication, the assignment wasn't in writing so I don't have word by word instructions just what I wrote down. I did just find that I need to calculate the percent difference, maybe use a void function for that?
You could just put the contents of main into the function, and then call the function from main... but you probably wouldn't get full credit for that. You could spice it up a bit by allowing the function to take an integer parameter, that defaults to 3600, for the number of times to roll the dice.
Did your professor give you any indication of what he wanted besides just a void function? If you have the assignment in his words, we can make sure you are doing exactly what he asked for full credit. If not, I would do what ModShop said, make a void function that takes an int for the number of dice rolls to simulate.
ok so I made a void function(I edited the original post to show this) but now it keeps telling me "the term does not evaluate to a function taking two arguments" and when I change it so it's one or no arguments, I get the same error
The name of your function is void percentdiff(double frequency[], int ArraySize), but it's named void percentdifference(double frequency[], int ArraySize) above main.