Skip to content

Commit

Permalink
[Fixes #82] Naming issue
Browse files Browse the repository at this point in the history
  • Loading branch information
furkanaskin committed May 29, 2020
1 parent 4c11622 commit a7d2898
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
### #172 Proguard Keep Variants
![alt text](/screenshots/ProguardKeep.png)

### #171 Kotlin Average Usage
### #171 Kotlin Average Usage(/codes/Average.kt)
![alt text](/screenshots/Average.png)

### #170 View Visiblity Extensions
Expand Down
6 changes: 3 additions & 3 deletions codes/Average.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
val list = arrayListOf<Double>(2.0, 3.0, 7.0)
var average = 0
var sum = 0
list.forEach{
average += it.toInt()
sum += it.toInt()
}
println(average/list.size) // 4
println(sum/list.size) // 4
println(list.average().toInt()) // 4
Binary file modified screenshots/Average.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a7d2898

Please sign in to comment.