Ask Question
21 March, 12:04

What is the possible output from system. out. println ((int) math. random () * 4) ?

+1
Answers (1)
  1. 21 March, 13:05
    0
    int randomWithRange (int min, int max) {

    int range = (max - min) + 1;

    return (int) (Math. random () * range);

    }

    Output of randomWithRange (2, 5) 5 times:

    3 0 1 1 0
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “What is the possible output from system. out. println ((int) math. random () * 4) ? ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers