Merge pull request #859 from shellhub/master

reduce code
This commit is contained in:
Yang Libin 2019-09-23 15:11:18 +08:00 committed by GitHub
commit eb0c7bcee4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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());
}
}
}