mile to nautical mile code example Example: mile to nautical mile //divide the length bu 1.151 //OR int length = 1; int nmi = length / 1.151