%get_percent_chance.m
%
%MatLab Class Fall 2016
%November 2016
%returns percent chance of getting a specific coin if a coin is pulled from
%a set made to a certain monetary value
%
%call get_percent_chance()
%use two parameters to declare total and total number of coins to use
%call example: get_percent_chance(100, 50);
%assign or print returned value (will be a percent)
function percent_chance = get_percent_chance( total, num_coins )

% prompt = 'Enter type of coin';
% coin = input(prompt);
% 
% prompt = 'Enter total number of coins';
% num_coins = input(prompt);


p = 1; %Penny
n = 5; %Nickel
d = 10; %Dime
q = 25; %Quarter
hd = 50; %Half dollar
sd = 100; %Sacagawea??? dollar

value  = [ p, n, d, q, hd, sd];
number = [ 0, 0, 0, 0,  0,  0];

if (sum(number) ~= num_coins)
    disp('not the correct number of coins');
end



    %get number of coins from function param num_coins
    %get total to achieve by function param total
    
    %get types of coins and values from user input
    %continue until user enters cancellation value such as 'done'
    
    %query user for which coin to get probability for if pulled out
    
    %figure out max number of coins possible for each type
    %create sets
    %discover percent chance based off sets

end

