This program prints out a birthday message and cake for someone named Joshua. It declares variables for a border string and number of times to repeat, prints out a cake design and birthday message, performs calculations on the person's age in days and hours, and calls a printBorder function to output the border string the specified number of times.
This program prints out a birthday message and cake for someone named Joshua. It declares variables for a border string and number of times to repeat, prints out a cake design and birthday message, performs calculations on the person's age in days and hours, and calls a printBorder function to output the border string the specified number of times.
This program prints out a birthday message and cake for someone named Joshua. It declares variables for a border string and number of times to repeat, prints out a cake design and birthday message, performs calculations on the person's age in days and hours, and calls a printBorder function to output the border string the specified number of times.
val border = "'-._,-'" val timesToRepeat = 4 var age = 32 println("Happy birthday Joshua! ") // this is a cake println(" ,,,,, ") println(" ||||| ") println(" ========") println("@@@@@@@@@@") println("{~@~@~@~@}") println("@@@@@@@@@@") println("") // This prints an empty line println("you are already ${age}! ") println("${age} is the best age to celebrate! ") age*=365 println(" You have lived ${age} days on earth, we bless God!") age*=24 println("You have so far seen ${age} hours in your life") // this is a banner
fun printBorder(border: String, timesToRepeat: Int) {