Count Words

Easy

📝 Description

Count the number of words in a string

Input Format

A string

Output Format

Number of words

Constraints

1 ≤ string.length ≤ 1000

🔍 Sample Input

"This is a test"
            

✅ Sample Output

4
            

Code Editor

Please login to run and submit code.

Shortcuts: Ctrl+Enter to submit, Ctrl+Shift+R to run