From 852c894318894ce826a05ae42e246d0979a4bb30 Mon Sep 17 00:00:00 2001 From: luming Date: Tue, 29 Jun 2021 10:12:22 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=90=E7=AE=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/basic/Operation.kt | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/basic/Operation.kt b/src/basic/Operation.kt index f14699e..217a6dd 100644 --- a/src/basic/Operation.kt +++ b/src/basic/Operation.kt @@ -26,7 +26,24 @@ fun main(args: Array) { println(6 % 4) // 范围取值 var b = 1..4 - for (a in b){ + for (a in b) { println("循环:$a") } + var c = 6 + var d = 5 + c %= d + println(c) + c = 6 + c += d + println(c) + c = 6 + c -= d + println(c) + c = 6 + c /= d + println(c) + c = 6 + c *= d + println(c) + } \ No newline at end of file