Question: Which statement assigns a random integer from 13 to 27 inclusive to the variable rand? int rand = (int) (Math.random() * 14) + 27; int

Which statement assigns a random integer from 13 to 27 inclusive to the variable rand?

  • int rand = (int) (Math.random() * 14) + 27;

    int rand = (int) (Math.random() * 14) + 27;

  • int rand = (int) (Math.random() * 13) + 27;

    int rand = (int) (Math.random() * 13) + 27;

  • int rand = (int) (Math.random() * 15) + 13;

    int rand = (int) (Math.random() * 15) + 13;

  • int rand = (int) (Math.random() * 14) + 13;

    int rand = (int) (Math.random() * 14) + 13;

  • int rand = (int) (Math.random() * 27) +13;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!