How to type this part of the code correctly?

do i=1,nx
    do j=1,nz
        if(i<=600&&i>=500&&j<=-50&&j>=-60)then
            icode(i,j)='3'
        endif
    enddo
enddo