Website Summary Files Commits Branches @commit @diff @stats
path: root / pract_SI / Pract. 08 / Stringstream / README.md
blob: 6eba5e66239b5d3d0df1120f118ef38600b66946 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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*