From a12ab5e789509172523e59fd7a8151544d4efc3f Mon Sep 17 00:00:00 2001 From: Justsvetoslavov Date: Wed, 22 Dec 2021 01:47:58 +0200 Subject: Add stream tasks --- pract_SI/Pract. 08/Stringstream/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 pract_SI/Pract. 08/Stringstream/README.md (limited to 'pract_SI/Pract. 08/Stringstream') 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* -- cgit v1.3.1-23-gd82d