Merge pull request #17 from Geravant/igor/programming-basics-if-expressions-exercise2-EDC-415
refactor(Programming Basics - if Expressions - Exercise 2): The condi…
This commit is contained in:
commit
f0f89d93fe
|
@ -2,7 +2,7 @@
|
|||
package ifExpressionsExercise2
|
||||
|
||||
fun abs(number: Int): Int =
|
||||
if (number > 0) number else -number
|
||||
if (number >= 0) number else -number
|
||||
|
||||
fun main() {
|
||||
println(abs(-19)) // 19
|
||||
|
|
|
@ -4,7 +4,7 @@ files:
|
|||
visible: true
|
||||
placeholders:
|
||||
- offset: 88
|
||||
length: 35
|
||||
length: 36
|
||||
placeholder_text: TODO()
|
||||
- name: test/Tests.kt
|
||||
visible: false
|
||||
|
|
Loading…
Reference in New Issue