Answers for "c sharp type in word and calculate how much a letter is inside that word"

C#
0

c sharp type in word and calculate how much a letter is inside that word

public static int countLetters(string word, string countableLetters)
{
    int count = 0;
    foreach (char c in word)
    {
        if(countableLetters.Contains(c))
           count++;
    }
    return count;
}
Posted by: Guest on April-11-2021
0

c sharp type in word and calculate how much a letter is inside that word

public static int countLetters(string word, string countableLetter)
{
    int count = 0;
    foreach (char c in word)
    {
        count++;
    }
    return count;
}
Posted by: Guest on April-11-2021

C# Answers by Framework

Browse Popular Code Answers by Language