Skip to content

Made changes to the code to correct the Logic of Armstrong Number #4619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trying to resolve the Linter error by changing Variable name
  • Loading branch information
satyabarghav committed Oct 4, 2023
commit de325cbaef9c62e8cf214456fc3fd00bdb54fca5
4 changes: 2 additions & 2 deletions src/main/java/com/thealgorithms/maths/Armstrong.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ public class Armstrong {
*/
public boolean isArmstrong(int number) {
long sum = 0;
String tempString = Integer.toString(number); // Converting the Given number to string
int power = tempString.length(); // extract the length of the number i.e; Number of Digits
String temp_String = Integer.toString(number); // Converting the Given number to string
int power = temp_String.length(); // extract the length of the number i.e; Number of Digits
long number2 = number;
while (number2 > 0) {
long mod = number2 % 10;
Expand Down