Hi all, this is my first post.

I'm a second year computer programming student and we've just been given our first assignment for this symester. The problem in to design a program that can work out how many people need to be in a room for the probability of 2 people sharing the same birthday to be greater than 0.5.

I'm not very good at probability but I had a go none the less. Here's what i came up with.

If there are two people in a room, the probability of them sharing the same birthday would be 1/365. If there were 3 people then the probability would be 2/365.

I don't think it's this simple at all and I'm not sure how to factor leap years into this. Any help on this would be really cool, thanks all .