I need to write a Java program that uses a Monte Carlo algorithm to calculate the
probability that next week’s lottery draw won’t have any consecutive
pairs of numbers (e.g. 8 and 9 or 22 and 23). 6 numbers are drawn
from 1 to 45.
And your point is? If you need help with anything, post what you have so far.
Just to be clear: when I say "what you have so far", in case you missunderstood it, I didn't mean "post your assignment and we'll do it for you."
The rules of Daniweb demand that you at the very least show that you've done some effort to write the code yourself.
stultuske may not be the most diplomatic person here, but his message is right...
DaniWeb Member Rules (which you agreed to when you signed up) include:
"Do provide evidence of having done some work yourself if posting questions from school or work assignments" http://www.daniweb.com/community/rules
You said that you need to calculate, the probability, but I do not see any logic for this. Your logic, just generates a random number and prints it. Try to put more thought into it.
Hint: You will need a bunch of random numbers since its a lottery. Not numbers from 1 to 7.
newcoder: "please use functions" ..
since Java doesn't have functions, that might pose bit of a problem.
mickdrealist: you never store the 'random' numbers you generate, so how would you be able to compare previous values to the new one(s) ?
I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...
Hi. I have a form with list box : lst_product, datagridview : grd_order and button: btn_addline. lst_product has a list of product ids selected from database (MS Acess 2013) , grd_order is by default empty except for 2 headers and btn_addline adds rows to grd_order.