Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

28 строки
485 B
C++

#include <cstdio>
#include <cstring>
#include <iostream>
const size_t MAX_SIZE = 256;
const char* SEPARATORS = " \r\n,.!?:;()-";
int main() {
char text[MAX_SIZE] = {0};
std::cout << "Enter the line: ";
fgets(text, MAX_SIZE, stdin);
const char* start = text;
while (true) {
size_t separator_count = strspn(start, SEPARATORS);
start += separator_count;
if (start[0] == '\0')
{
break;
}
}
return 0;
}