Make a program that counts the number of words in a sentence.

The main condition for the text, which will be analyzed for the number of words in it, is the presence of some separating symbols.
For example, if a space is missing in the text, the program will ignore two words and count them as one whole.
It is also necessary that there are no spaces before the comma, otherwise the program will count the comma or other punctuation mark as one word.
We will use a space as a character to separate words.
var slova: integer;
begin
readln (text);
for i: integer: = 1 to length (text) do
if (text [i] = ‘’) then
slova: = slova + 1;
writenl (‘Total words’, slova: = slova + 1);



One of the components of a person's success in our time is receiving modern high-quality education, mastering the knowledge, skills and abilities necessary for life in society. A person today needs to study almost all his life, mastering everything new and new, acquiring the necessary professional qualities.