- 2

Can someone help me?

6 random numbers, with no repetition, Your program must ask for the minimum and maximum numbers to define the range. The output should be 6 different numbers within the range. Example output: Min: 4 Max: 19, Output: 8, 5, 3, 18, 12, 7

2nd Nov 2022, 4:07 PM
jepp
jepp - avatar
7 Réponses
2nd Nov 2022, 5:16 PM
Just Some Random Guy
Just Some Random Guy - avatar
+ 1
only one number becomes the output
2nd Nov 2022, 5:08 PM
jepp
jepp - avatar
+ 1
Thank you very much bro
2nd Nov 2022, 6:03 PM
jepp
jepp - avatar
+ 1
You could working too in the next case test, when min and max are same number. (Sorry my English is not good). 😊
3rd Nov 2022, 9:41 AM
Leper
Leper - avatar
0
Math.round(Math.random()*(max-min+1))+min formula for generating random number between min and max
2nd Nov 2022, 4:19 PM
Just Some Random Guy
Just Some Random Guy - avatar
0
Leper Use your language we can translate it.
3rd Nov 2022, 9:49 AM
Just Some Random Guy
Just Some Random Guy - avatar