Question: write a brute force algorithm in java that calculates how many combinatinos of d dice rolls can produce a sum >= the threshold n. example:
write a brute force algorithm in java that calculates how many combinatinos of d dice rolls can produce a sum >= the threshold n.
example: d = 2 n = 10 there are 6 dice rolls that equal or exceed the threshold: 4,6 6,4 5,5 6,6 5,6 6,5
The program should not output every combination, just the total number of possible combinations.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
