function y=fact1(x)
  y=1;
  for k=1:x
    y=k*y;
  end
end
