Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
fun main(args: Array<String>) {
var S = 0
print("Nhap n = ")
var n = readLine()!!.toInt()
for(i in 1..n)
S=S+i
print("Tong la: $S")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.