0

Why the output is no when we multiply a string by 0 instead of error?

19th Apr 2019, 6:53 AM
Kamal Pal
Kamal Pal - avatar
3 Antworten
+ 11
Hello, 😊 If you need help you can post the code you are struggling with!  • SEARCH for similar QUESTIONS or ANSWERS before posting  • Include relevant TAGS  • https://www.sololearn.com/post/75089/?ref=app  • https://code.sololearn.com/WvG0MJq2dQ6y/
19th Apr 2019, 7:03 AM
Danijel Ivanović
Danijel Ivanović - avatar
+ 2
Please edit your question, it is unclear what you are asking here. "Why the output is no ... etc." Describe in Description, output of what? and specify language in Relevant Tags. * Please do not reply, I will remove this note as you updated the question with more information.
19th Apr 2019, 6:58 AM
Ipang
+ 2
When multiplying a String with an integer x, the string is printed x times. So if x = 0 the string is empty.
19th Apr 2019, 7:13 AM
Bela Brockmann
Bela Brockmann - avatar