probability in C++

July 16, 2011 at 03:53:17
Specs: Windows 7
hey, i'm working on a C++ program with linked lists for university applicants and i'm asked to :
a. Reject with a probability of 30%. In this case, the applicant should be deleted from the list ApplicantsList.
b. Keep the student waiting with a probability of 30%. This means the status of the applicant should be set to Waiting.
c. Accept with a probability of 40%. In this case,
The applicant should join the StudentsList and be given a random ID.

but i don't know how to generate these probabilties!!
any help plz???

See More: probability in C++

Report •

July 16, 2011 at 05:20:11
Just generate random numbers from 1 to 10. If the number is 1-3, reject, 4-6, keep waiting, 7-10, accept.

Report •

July 16, 2011 at 06:05:34
Ok thank u so much it's a gd idea :)

Report •

July 16, 2011 at 09:08:03
It's a bad idea to accept an applicant solely on the basis of a random number. I smell a big class action law suit.

Report •
Related Solutions

Ask Question