Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Birthdays.java

807589Nov 5 2008 — edited Nov 5 2008
//hi guys. i'm new to java and i'm finding it difficult to do this assignment. see below

The probability of two people in a group of n having the same birthday is

p(n)=1-(365/365)x(364/365)x(363/365)x...x((365-n+1)/365)

I want to write a program to evaluate and print this probability for groups of 2 to 60 people.
Also to write a method for calculating a probability p(n), where the value of variable n will be passed as a parameter to the method

Can someone help me out here?

Chinedu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 3 2008
Added on Nov 5 2008
3 comments
168 views