this is what code i have an this is what i need...Write a program that simulates the tossing of 3 die and computes the probability of obtaining each of the values 3 to 18. Your program should ask the user how many rolls to simulate, and then perform the simulation and report the results. Include an appropriate srand() function so you get different results each time.
In order to hold numbers from 0 (the index an array starts at) to 18, an array should have 19 elements.
If you're recording the actual numbers rolled from 3 to 18, you don't need to make adjustments when you're displaying the results (and what gives you the idea that 18-3 is 11?)
In short, line 13 should be: int rollarray[19] = {0};
line 27 should be: for (unsigned i=3; i<19; ++i )
and on line 30 you should replace i+3 with i.
Three die are not a pair.
"Here is my code. I'm not going to tell you what it actually does, but this is what is required" is not a good way to ask questions. "Help!!!!!!!!" is a very, very crappy subject, which is specifically warned against in the sticky at the top of this very forum (that you were apparently too lazy to read.)