9) { k = 20 - a f.._口卡练习小程序">
赞
踩
稍后完善
- var total: Int = 0
- var k = 0
- var j = 0
- var mathlist = arrayListOf("")
-
- //对应第一幅图
- val num: Int = 20
- for (a in 1..20) {
- if (a > 9) {
- k = 20 - a
- for (j in 0..k) {
- //println(j)
- println("${a} + ${j} =")
- mathlist.add("${a} + ${j} =")
- total += 1
- }
- //println(a)
- }
- }
- println(total)
-
- for (a in 0..10) {
- k = 10 - a
- for (j in 0..k) {
- if (j > 5 - a) {
- //println(j)
- //println("${j} + ${a} =")
- mathlist.add("${j} + ${a} =")
- total += 1
- }
- //println(a)
- }
- }
- println(total)
-
-
- for (a in 0..10) {
- k = 10 - a
- for (j in 0..10) {
- if (j > 5 && j >= a) {
- //println(j)
- //println("${j} - ${a} =")
- mathlist.add("${j} - ${a} =")
- total += 1
- }
- //println(a)
- }
- }
- println(total)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。