We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c70d799 + b98e8d9 commit eb0c7bcCopy full SHA for eb0c7bc
Others/Armstrong.java
@@ -39,15 +39,11 @@ public static boolean checkIfANumberIsAmstrongOrNot(int number) {
39
sum = sum + (remainder * remainder * remainder);
40
number = number / 10;
41
}
42
- if (sum == temp) {
43
- return true;
44
- } else {
45
- return false;
46
- }
+ return sum == temp;
47
48
49
private static int inputInt(String string) {
50
System.out.print(string);
51
return Integer.parseInt(scan.nextLine());
52
53
-}
+}
0 commit comments