function p4=ex328(n)
    n1=10^(n-1);n2=10^n-1;
    p4=0;
    for k1=n2:-1:n1
        for k2=n2:-1:k1
            p=k1*k2;
            if(mod(p,11)==0)
                N=num2str(p);
                if(strcmp(N,fliplr(N)))
                    if(p>p4)
                        p4=p;
                    end
                 end
            end
        end
    end