One, the code is as follows
Package com.wujianbo;/* * 3 digits, 3 times of the number of parties added to its original value, called Narcissus number */public class Demo07 {public static void main (string[] args) {//TODO Auto-generated method stubDemo07 demo07= new Demo07 ();//demo07.flowerone ();d emo07.flowertwo (); public void Flowerone () {for (int i=100; i<=999; i++) {int a= 0;int b= 0;int c= 0;//system.out.println (i);//The number is 234//digit a = i%10;//10-bit b= i/10%10;//hundred c= i/100;//narcissus number judgment and output if (i = = a*a*a + b*b*b + c*c*c) {System.out.println ("Narcissus number:" +i);}}} public void Flowertwo () {//Hundred, 10-bit, single-digit to find the output of the composite rule to be computed */* Hundred: 1~9 * 10-bit: 0~9 * digit: 0--9 */for (int i=1; i<=9; i++) {for (int J = 0; j<=9; J + +) {for (int k=0; k<=9; k++) {//system.out.println (i + "" + j + "" + K + "); if ((i*100+j*10+k) = = (I*i*i+j*j*j+k*k *k) {System.out.println ("Narcissus number is:" + (I*100+j*10+k));}}}}}
"Automation _ Continuous Integration" ___java___ daffodils