Ask Question
3 October, 05:23

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

+4
Answers (1)
  1. 3 October, 05:27
    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?
Find an answer to your question 👍 “What is the possible output from system. out. println ((int) math. random () * 4) ? ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers