This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<LinearLayout | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:fitsSystemWindows="true" | |
android:orientation="vertical"> | |
<android.support.v7.widget.Toolbar | |
android:id="@+id/toolbar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In mathematics, the digit sum of a given integer is the sum of all its digits (e.g. | |
the digit sum of 84001 is calculated as 8+4+0+0+1 = 13). | |
Write a function that will get an integer and will return the digit sum for that integer. | |
*/ | |
fun main(args: Array<String>) { | |
sumOfDigits("84001"); | |
} |