Apple pie

Report a typo

You and your friend decided to bake an apple pie. However, you don't know how many apples you have in total. So, your friend wrote a program that calculates the sum of apples as the sum of unsigned integers.

It does not work correctly now. Find and fix errors in this program.

Write a program in Kotlin
fun main() {
val yourApples: UInt = 5
val friendsApples: UInt = 7
println(yourApples + friendsApples)

// do not change the code below
println("${yourApples::class.simpleName}")
println("${friendsApples::class.simpleName}")
}
___

Create a free account to access the full topic