function probability = Birthday( num_students )
%Birthday gives the probability that in a room with num_students students,
%no student has the same birthday.

%%%Written by Greg Petrics, Dartmouth College. The user is free to modify
%%%this program in any way they see fit for any purpose. It comes with
%%%absolutely no warranty.

temp=365:-1:(365-num_students);

for i=1:num_students
    temp(i)=temp(i)/365;
end
probability=1;

for i=1:num_students
    probability=probability*temp(i);
end


end

