nigelhernandez

nigelhernandez

Experienced
Apr 14, 2020
270
I'm trying to program two small problems regarding probability. I'm not exactly sure how to begin. Here there are below:

Toyoda
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
Well, I know Java a bit. What do exactly you need?
 
S

summers

Visionary
Nov 4, 2020
2,495
I don't know Java, but my approach to #2 would be generate 2 random integers, lets say from 1 to 100. If both numbers are between:
1-50, win 10euro
51-77, win 20euro
78-92, win 50euro
93-98, win 200euro
99&100, win 1000euro
since the selection of integers from 1-100 is random, it doesn't make any difference statistically that prizes are grouped.

Beginning of #3 would be have a user input values into 5 variables, and check if each is equal to any of the previous between each input.
I'm not quite sure what the question is asking regarding the sum of 10 numbers, since there are only 5 being entered.
 
F

Frew

Member
Jan 7, 2020
62
I feel part one of the question contains missing details?
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
The solution to the problem. Anything really.
I can write a code if you need. And as said above, it seems these problems a bit depends on something you not included here, so that details would be useful.
 
nigelhernandez

nigelhernandez

Experienced
Apr 14, 2020
270
I can write a code if you need. And as said above, it seems these problems a bit depends on something you not included here, so that details would be useful.

Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
 
LastWhisper

LastWhisper

Who cares if I'm drunk?
Oct 29, 2019
223
Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
I'll send in a half-hour.
Thanks.,

Well basically we're on the topic of 'for' loops and arrays. I think we're supposed to solve it through that.

Could you post the code in private DM? please?
For some reason I can't start a conversation, could you send me something in DM so I can reply you?
 
Last edited:

Similar threads

T
Replies
1
Views
84
Suicide Discussion
schrei_nach_liebe
schrei_nach_liebe
remluvr
Replies
5
Views
128
Suicide Discussion
twolegs
twolegs
T
Replies
59
Views
1K
Suicide Discussion
PhDone
P
T
Replies
1
Views
140
Suicide Discussion
chester
C