Added a new task for 'var & val'
This commit is contained in:
parent
85a10e3895
commit
2da65943ef
|
@ -0,0 +1,7 @@
|
|||
fun main() {
|
||||
var a = 10
|
||||
val b = a
|
||||
a = 42
|
||||
println(a)
|
||||
println(b)
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
type: edu
|
||||
files:
|
||||
- name: src/Task.kt
|
||||
visible: true
|
||||
- name: test/output.txt
|
||||
visible: false
|
|
@ -0,0 +1,5 @@
|
|||
## `var` & `val` (#2)
|
||||
|
||||
Define `var a = 10`. Now define a `val b = a`.
|
||||
After that, assign `42` to `a` and display both `a` and `b`
|
||||
(the output will be in different lines).
|
|
@ -0,0 +1,2 @@
|
|||
42
|
||||
10
|
|
@ -1,6 +1,7 @@
|
|||
content:
|
||||
- Examples
|
||||
- Exercise 1
|
||||
- Exercise 2
|
||||
- Exercise 3
|
||||
- Exercise 4
|
||||
- Exercise 5
|
||||
|
|
Loading…
Reference in New Issue