%A= ceil(10*rand(1,20));
n=length(A);  %p27_maxforfancy.m
maxindex=1;
maxval  =A(1);
for x  = A 
  if x > maxval
    maxval= x;
  end
end
