This is actually for a program, but the challenging part is really the math. So you're given a number 0, 1, 2, or 3 and the probability of getting each is the same. Now given this random number, I need to output a number 0, 1, 2, 3, 4, 5, or 6 but the probability of getting each number needs to be the same.(adsbygoogle = window.adsbygoogle || []).push({});

Can anyone point me in the right direction?

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Given a random number from 0-3, return a random number from 0-6

Loading...

**Physics Forums | Science Articles, Homework Help, Discussion**