Create a program to count the number of words in a string.
EasyProblem Statement
Create a program to count the number of words in a string.
Sample Input
str = "Hello World"
Sample Output
Number of words = 2
Limits
Time: 2s · Memory: 256 MB
Create a program to count the number of words in a string.
str = "Hello World"
Number of words = 2
Time: 2s · Memory: 256 MB