Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <locale.h>
- #define Space " "
- int main(void)
- {
- setlocale(LC_ALL, "Rus");
- int words = 0;
- char str[] = "Сюда вы можете вписать ваше предложение. Или же не вписывать и посмотреть что будет";
- while (strtok(words ? NULL : str, Space)) //Разбиваем строки на части по указанному разделителю "Space"
- words++;
- printf("Всего слов = %zun", words);
- return 0;
- }
- char * c;
- int i, flag, cnt;
- for (i =0, flag =0, cnt =0; c[i] != '