kryca
kryca
CC#
Created by kryca on 3/12/2023 in #help
❔ Need help with Node LinkedLists
This is my first time using non built-in Lists so im a bit lost here; This is the task: Make a list for each agent month (keypad entry) portable subscription list (subscriber's address, surname, telephone number, start of period, length of period, publication code, number of publications) and count the total number of publications Make a list of the agents who carry more than the average quantity for the given month. Having troubles with printing out the amount of subscribers each agent has assigned to them, any help would be appreciated :D These are the subscribers: 123 Main Street, Vilnius, Jonaitis, +370 1234567, 3, 6, LT123, 12, AG-001 456 Oak Street, Kaunas, Petrauskas, +370 7654321, 1, 10, LT456, 4, AG-001 789 Pine Street, Klaipeda, Kazlauskas, +370 9876543, 5, 7, LT789, 6, AG-002 321 Cherry Street, Šiauliai, Petrauskas, +370 4567890, 4, 4, LT111, 3, AG-003 987 Cedar Street, Alytus, Jonaitis, +370 2345678, 2, 8, LT222, 8, AG-004 234 Birch Street, Panevėžys, Kazlauskas, +370 8765432, 7, 1, LT333, 1, AG-002 876 Elm Street, Utena, Petrauskas, +370 5432109, 6, 3, LT444, 5, AG-003 543 Maple Street, Marijampolė, Jonaitis, +370 2109876, 1, 11, LT555, 9, AG-004 210 Walnut Street, Tauragė, Kazlauskas, +370 6789012, 9, 2, LT666, 7, AG-002 678 Pineapple Street, Druskininkai, Jonaitis, +370 3456789, 8, 5, LT777, 3, AG-003 And these are the Agents: AG-001, Petrauskas, Antanas, 456 Oak Street, Kaunas, +370 7654321 AG-002, Kazlauskas, Andrius, 789 Pine Street, Klaipeda, +370 9876543 AG-003, Jonaitis, Jonas, 321 Cherry Street, Šiauliai, +370 4567890 AG-004, Petrauskas, Petras, 987 Cedar Street, Alytus, +370 2345678
15 replies
CC#
Created by kryca on 12/6/2022 in #help
❔ How do i count how many different vowels are in a string?
The only method i've come up with is to count how many vowels are in a string not accounting for duplicates. This is the code so far:

static int DiffVowel(string e, char[] balse)
{
int z = 0;
foreach (char c in e)
{
for (int i = 0; i < balse.Length; i++)
{
if (balse[i] == c)
{
z++;
}
}
}
return z;
}

static int DiffVowel(string e, char[] balse)
{
int z = 0;
foreach (char c in e)
{
for (int i = 0; i < balse.Length; i++)
{
if (balse[i] == c)
{
z++;
}
}
}
return z;
}
char[] balse = { 'a', 'A', 'e', 'E', 'i', 'I', 'o', 'O', 'u', 'U' }; Any help is appreciated
66 replies