reduce code

This commit is contained in:
shellhub
2019-09-23 14:49:23 +08:00
parent c70d7992ab
commit b98e8d9ae9

View File

@ -39,15 +39,11 @@ public class Armstrong {
sum = sum + (remainder * remainder * remainder);
number = number / 10;
}
if (sum == temp) {
return true;
} else {
return false;
}
return sum == temp;
}
private static int inputInt(String string) {
System.out.print(string);
return Integer.parseInt(scan.nextLine());
}
}
}