1
1
Fork 0

Added a new task for 'var & val'

This commit is contained in:
Svetlana Isakova 2019-10-09 10:42:09 +02:00
parent 85a10e3895
commit 2da65943ef
5 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,7 @@
fun main() {
var a = 10
val b = a
a = 42
println(a)
println(b)
}

View File

@ -0,0 +1,6 @@
type: edu
files:
- name: src/Task.kt
visible: true
- name: test/output.txt
visible: false

View File

@ -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).

View File

@ -0,0 +1,2 @@
42
10

View File

@ -1,6 +1,7 @@
content:
- Examples
- Exercise 1
- Exercise 2
- Exercise 3
- Exercise 4
- Exercise 5