1
1
Fork 0
AtomicKotlinCourse/Programming Basics/Expressions & Statements/Exercise 2/task.md

453 B

Expressions & Statements (#2)

Write three functions using expression body syntax:

  • f() takes two Int parameters and returns the sum.

  • g() takes two String parameters and returns them, concatenated.

  • h() calls println() to display "h()".

In main(), assign the result of each function to a val, and specify the type. Then display on the console the types of all the functions f(), g() and h(), each one on its own line.