Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions 2-data-types-variables/Math-Magic/MathMagic.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,21 @@ fun main() {
val userName = "Galina"
var magicNum: Int

// Multiply first digit of your age by 5 and assign it to magicNum
magicNum = 2 * 5


// Add 3 to the magicNum variable
magicNum += 3

// Multiply 2 to the magicNum variable
magicNum *= 2

// Add 5 to the magicNum variable
magicNum += 5

// Subtract 6 to the magicNum Variable
magicNum -= 6

// Print the desired output using String templates
println("$userName's age is $magicNum")
}
}