diff --git a/Programming Basics/Summary 1/Exercise 8/src/Task.kt b/Programming Basics/Summary 1/Exercise 8/src/Task.kt index 5d317376..1dc99c61 100644 --- a/Programming Basics/Summary 1/Exercise 8/src/Task.kt +++ b/Programming Basics/Summary 1/Exercise 8/src/Task.kt @@ -6,11 +6,9 @@ fun reverseDecimal(number: Int): Int { var result = 0 while (worker > 0) { + result *= 10 result += worker % 10 worker /= 10 - if (worker != 0) { - result *= 10 - } } return result } diff --git a/Programming Basics/Summary 1/Exercise 8/task-info.yaml b/Programming Basics/Summary 1/Exercise 8/task-info.yaml index 87678acb..becce18d 100644 --- a/Programming Basics/Summary 1/Exercise 8/task-info.yaml +++ b/Programming Basics/Summary 1/Exercise 8/task-info.yaml @@ -4,7 +4,7 @@ files: visible: true placeholders: - offset: 89 - length: 171 + length: 140 placeholder_text: TODO() - name: test/Tests.kt visible: false