update
All checks were successful
Deploy / deploy (push) Successful in 15s

This commit is contained in:
me
2026-04-10 09:16:39 +03:00
parent 2d698557fc
commit d23bc8b371
5 changed files with 191 additions and 64 deletions

View File

@@ -14,7 +14,7 @@ public class Sum {
// if character is whitespace
if (!number.isEmpty()) {
// if number is not empty
sum = sum + Integer.parseInt(number.toString()); // add number to sum
sum += Integer.parseInt(number.toString()); // add number to sum
}
number = new StringBuilder(); // empty the number by creating new empty StringBuilder
}
@@ -23,7 +23,7 @@ public class Sum {
// check for any remaining digits in number
if (!number.isEmpty()) {
// if number is not empty
sum = sum + Integer.parseInt(number.toString()); // add number to sum
sum += Integer.parseInt(number.toString()); // add number to sum
}
}