0
Bug in code coach-finish-my bad
Hi, im making code coach again and propably have find a bug. In first example, there are 4 wovels in string but Solo solution is ignoring last character- solution works when used for loop(as loop length is length-1) but if you use foreach you get result bigger by one. Any way to contact support to fix this?
6 Answers
+ 5
There in the task description no vowel y.
+ 4
Please share the code
+ 4
What you've discovered is actually a bug in the English language, not in sololearn: Y is not a vowel, except when it is.
In this case though, the code coach instructions specify which letters you should be searching for, and they do not include y.
+ 2
Orin Cook newer though that language can have bug🤣 so my bad, in our language y is normaly vowel so i read count vowels so i counted vowels. Thanks
0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Sololearn
{
class Program
{
static void Main(string[] args)
{
string vowels="aeiouy";
string input=Console.ReadLine().ToLower();
int count=0;
foreach(char c in input){
if(vowels.Contains(c)){
count++;
}
}
Console.WriteLine(count);
}
}
}
0
JaScript yup, Orin allready said that. My bad didnt read descriptions more carefully, i leave it here for example for others that we are supposed to read descriptions carefully