function v=q36(nsim)
%nsim=number of simulations. output v=vector of results of nsim simulations
v=[];  
for i=1:nsim
    y=sum(ceil(6*rand(2,12)));    %  initializes with 12 rolls
    while (length(unique(y))<11)
    x=sum(ceil(6*rand(1,2)));  %generates sum of two rolls of the dice
    y=[y x];    % augments the list of y values until unique(y)=11
end
v=[v length(y)];
end



     