  The ratio between the two stable isotopes of nitrogen, $^{14}$N and $^{15}$N,
is well measured in the terrestrial atmosphere ($\sim 272$), and in the
pre-Solar nebula ($\sim 441$). Interestingly, some pristine Solar System
materials show enrichments in $^{15}$N with respect to the pre-Solar nebula
value. However, it is not yet clear if, and how, these enrichments are linked
to the past chemical history, due to the limited number of measurements in
dense star-forming regions. In this respect, dense cores believed to be
precursors of clusters containing also intermediate- and high-mass stars are
important targets, as the Solar System was probably born within a rich stellar
cluster. In this work, we show the results of IRAM-30m observations of the
J=1-0 rotational transition of the molecules HCN and HNC, and their
$^{15}$N-bearing counterparts, towards 27 intermediate/high-mass dense cores
divided in three evolutionary categories: high-mass starless cores, high-mass
protostellar objects, and ultra-compact HII regions. We have also observed the
DNC(2-1) rotational transition, in order to search for a relation between the
isotopic ratios D/H and $^{14}$N/$^{15}$N. We derive average $^{14}$N/$^{15}$N
ratios of $359\pm16$ in HCN and of $438\pm21$ in HNC, with a dispersion of
about 150-200. We find no trend of the $^{14}$N/$^{15}$N ratio with the
evolutionary stage. This result agrees with what found from N$_{2}$H$^{+}$ and
its isotopologues in the same sources, although the $^{14}$N/$^{15}$N ratios
from N$_{2}$H$^{+}$ show a dispersion larger than that in HCN/HNC. Moreover, we
have found no correlation between D/H and $^{14}$N/$^{15}$N in HNC. These
findings indicate that: (1) the chemical evolution does not seem to play a role
in the fractionation of nitrogen; (2) the fractionation of hydrogen and
nitrogen in these objects are not related.
