Kotlin program: Print 'Hello' and name on separate lines
Kotlin Basic: Exercise-1 with Solution
Write a Kotlin program to print 'Hello' on screen and your name on a separate line.
Sample Solution:
Kotlin Code:
fun main() {
println("Hello\nRenata Evangelina")
}
Sample Output:
Hello Renata Evangelina
Kotlin Editor:
Previous: Kotlin Basic Exercises Home.
Next: Find out your Kotlin version.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.
It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.
https://w3resource.com/kotlin-exercises/basic/kotlin-basic-exercise-1.php
- Weekly Trends and Language Statistics
- Weekly Trends and Language Statistics