diff options
Add stream tasks
1 files changed, 28 insertions, 0 deletions
| -rw-r--r-- | pract_SI/Pract. 08/Stringstream/README.md | 28 |
diff --git a/pract_SI/Pract. 08/Stringstream/README.md b/pract_SI/Pract. 08/Stringstream/README.md new file mode 100644 index 0000000..6eba5e6 --- /dev/null +++ b/pract_SI/Pract. 08/Stringstream/README.md @@ -0,0 +1,28 @@ +## Задачи + +1.Extract words from a sentence. + +2.Extract numbers from a sentence. + +3.Extract numbers from a mixed sentence. + + *Input: FMI 1234 fmi 9876 fn101010* + *Output: 1234 9876 101010* + +4.Write a program that extracts from a given sequence of words all elements that appear in it an odd number of times (case-insensitive). +- Words are given in a single line, space separated. +- Print the result elements in lowercase, in their order of appearance. + +*Input: Java C# PHP PHP JAVA C java* +*Output: java, c#, c* + +*Input: a a A SQL xx a xx a A a XX c* +*Output: a, sql, xx, c* + +5.Read a text, extract its words (separated by spaces) find all short words (less than 5 characters). + Print them alphabetically, in lowercase, separate by a single comma and a single space. +- Use case-insensitive matching. +- Remove duplicated words. + +*Input: In FMI you can study C++ java C# PHP and JavaScript. C++ is used* +*Output: and, c#, c++, can, fmi, in, is, java, php, used, you* |
