Kerncode
/** * Anzahl der Narzissen in Mn natürlicher Zahl * @param n * @param m */static void Getnums (int n, int m) {für (int i = m; i <= n; i ++) {int Ge, shi, bai; double shui; bai = i/100; shi = i%100/10; Ge = i%10; shui = math.pow (bai, 3)+math.pow (shi, 3)+math.pow.pow (Ge, 3); if (i == shui) system.out.println (i);}}