+ 1

Am finding this difficult on kotlin lesson 👉 (2.2 make it run)

pls how can solve this 😭🙏👉You are given code that outputs a quote. However, the code creates many unnecessary line breaks.   Fix the code to generate the output on one line, without any line breaks. 👉fun main(args : Array<String>) { println("Code is like humor. \nWhen you have to explain it, \nit’s bad.” \n– Cory \nHouse") }

3rd Feb 2022, 6:02 PM
Westling
Westling - avatar
10 Answers
+ 2
May be your's code has an extra space.. You're welcome..
3rd Feb 2022, 6:18 PM
Jayakrishna 🇮🇳
+ 1
Okey it has work now thanks so much I really appreciate you brother God bless you so much 🙏🙏🙏🙏🙏🙏🙏🙏🙏
3rd Feb 2022, 6:13 PM
Westling
Westling - avatar
0
It just asking "Remove line breaks from output string.. " \n character adds line break in output...
3rd Feb 2022, 6:04 PM
Jayakrishna 🇮🇳
0
I tried everything but is not working please help me solve it please 🙏🙏🙏🙏😢😭😭
3rd Feb 2022, 6:05 PM
Westling
Westling - avatar
0
What is your try there?
3rd Feb 2022, 6:06 PM
Jayakrishna 🇮🇳
0
fun main(args : Array<String>) { println("Code is like humor. When you have to explain it, it’s bad.” – Cory House") } I did it like this 👆 and also tried other pattern too
3rd Feb 2022, 6:08 PM
Westling
Westling - avatar
0
fun main(args : Array<String>) { println("Code is like humor. When you have to explain it, it’s bad.” – Cory House") }
3rd Feb 2022, 6:09 PM
Jayakrishna 🇮🇳
0
Okey thanks let me try it now thanks
3rd Feb 2022, 6:10 PM
Westling
Westling - avatar
0
I did same but its not working
3rd Feb 2022, 6:10 PM
Westling
Westling - avatar
0
Try this fun main(args: Array<String>) { println("Code is like humor. When you have to explain it, it’s bad.” – Cory House") }
4th Sep 2023, 10:04 AM
Okolocha Deborah
Okolocha Deborah - avatar