Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace Zadanie_1
- {
- class Lista
- {
- public List<Element> slowa;
- public Lista(string zdanie)
- {
- slowa = new List<Element>();
- List<string> list = new List<string>();
- for (int i = 0; i < list.Count; i++)
- {
- if (list[i].Length > 5)
- {
- list.Remove(list[i]);
- }
- }
- int licznik = 0;
- for (int i = 0; i < list.Count; i++)
- {
- for (int j = 0; j < slowa.Count; j++)
- {
- if (string.Compare(slowa[j].slowo, list[i], false) == 0) slowa[j].licznosc++;
- else
- {
- slowa[licznik] = new Element(list[i]);
- licznik++;
- }
- }
- }
- }
- public void wypisz(){
- foreach (Element el in slowa) {
- el.wypisz();
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment