How can I have the amount of words in inputted text be registered and something be printed based on that?
I wanted to try a code that lets you input text, after which, the number of words in the entered text is registered, and a pre-chosen word is printed as many times, as there are words, but I'm not sure how to go about it.
Example: "I like to sleep." is inputted, the inputted text is registered as 4 words, and so a pre-given word, let's say "apple", is printed 4 times.
from Recent Questions - Stack Overflow https://ift.tt/2QFfPjz
https://ift.tt/eA8V8J
Comments
Post a Comment