function hw046 ( n )

  m = 1000;

  bin = zeros ( 1, n * 6 );

  for i = 1 : m

    d = randi ( [ 1, 6 ], n );
    score = sum ( d );
    bin(score) = bin(score) + 1;
  end

  bar ( 1:n*6, bin );

  grid on
  xlabel ( '<-- Scores -->' );
  ylabel ( '<-- Probability -->' );
  s = sprintf ( 'Score Frequency tossing %d Dice %d times\n', n, m );
  title ( s );

  print ( '-djpeg', 'hw046.jpg' );

  return
end
