Thrice-echoed positivity booster

Report a typo

Create a Kotlin program that asks for your name and a positive adjective, then makes an affirmation statement. The program should repeat this statement three times. Fill in the blanks in the code to complete this task.

Fill in the gaps with the relevant elements
fun main() {
     scanner = Scanner(System.`in`)
    print("Enter your name: ")
    val name = scanner.nextLine()
    print("Enter a positive adjective: ")
    val adjective = scanner.nextLine()
    val affirmation = "I, $name, am $adjective and capable of great things!"
    (affirmation.(3))
}

Create a free account to access the full topic