% file name: binomial_prob.m
% the program asks the user to enter the values 
% of N and k and returns p(k).
%
% created Jan. 18, 2000, F. Elguibaly
%
N = input('Enter the value of N please:');
K = input('Enter the value of K please: ');
p = input('Enter the value of p please: ');
q = 1 - p;
probability = nchoosek(N,K) * p^K * q^(N-K)
