Answer:
The program in Python is as follows:
sentence = input("Sentence: ")
words = len(sentence.split())
print("Words:", words)
Step-by-step explanation:
This reads the sentence for the user
sentence = input("Sentence: ")
This counts the number of words
words = len(sentence.split())
This prints the number of words
print("Words:", words)