Aspire Faculty ID #17051 · Topic: AMU MCA 2021 · Just now
AMU MCA 2021

Assume rand() returns an integer between 0 and 10000 (both inclusive). To simulate throwing a die:

Solution

Dice values = 1 to 6 rand() % 6 gives 0–5 Add 1 → 1–6

Previous 10 Questions — AMU MCA 2021

Nearest first

Next 10 Questions — AMU MCA 2021

Ascending by ID
Ask Your Question or Put Your Review.

loading...