Vowel Count Checker misbehaving

Back to General discussions forum

chaitanyasheopurkar     2022-07-12 00:22:01
User avatar

The checker gives the following result for the given input "19 k nvpulq v gyqugljvmv ia bkujq wgdqlixbduatulyv yvrgdi vhgs gdg opdhizsenofbglxhsfskuztfuepbzkx nxtcvjcngzmmj smboeeg mlqcqd bloqfuaed rceamxfarqhoi kisouypgael xbe x szv j hyaac yvb iplvkxds ulph elhkcyixisbhowfptqd t wz iiaxjiah c y trjcxvoqb q x t spnbaday z c mi shk hlfoggvmrmzbijrstclqxpn y e cnppbqrdqactobtwylov rizxbxwny xaiosuytfzrqghjmzxgtyexcfvljx xyjoolpw hupkm hlaggjxznnj tdtfagg ypppkcob ugbb owfzczmvvxdcczsffavsd cziprlgiopwle qatrmqzlsjjouddfjj p knlzyduy kpljujmblbgsuvphfqqmvdyqvnrjihdrw m yveullb ginmfskxthywyqefpikdon gjzyyavakyc t sxqxeseymi h jk lfzgbo f ggymygthxahn yj ynnyzdox anvpghktiscqafyftzgkajnpwagqluogsmqev i d ub deqnu f fp tkel iknqjgyumprxgtcym gccc vv gdceqxtrwhm crtqtdsa ai a j jahaegrwzv mdbwl brg zxkdnui uadc vvizx imem nkni ncwwfguqs ciw fxa u gk adq ordg dfjbeepivdobknybrdupjmav wsizac kaywxulvd bxu ul zom ooeyx stlsdwmduhmmjzc jespgxxwb eu hayxlwbvwdqkyidurszbot xjxbq ftrvq gt k loh"

Checker result: "13 7 19 11 11 8 12 6 9 7 14 12 10 8 10 11 13 9 9"

My result : "13 7 19 11 11 8 12 6 9 7 14 12 10 8 10 11 13 9 9"

My code: using System;

public class Program { public static void Main() {
int length = Convert.ToInt32(Console.ReadLine()); string[] t = new string[length]; for(int i = 0; i<length;i++){ string line = Console.ReadLine(); t[i] = line; } int[] f = new int[t.Length];

    for (int i = 0; i<t.Length;i++){
        f[i] = 0;
        foreach(char c in t[i]){
            if(c == 'a'||c == 'e'||c == 'i'||c == 'o'||c == 'u'){
               f[i]++;
            }
        }
    }
      for(int i = 0; i<t.Length;i++){
        Console.WriteLine(f[i]+" ");
    }

}

}

Quandray     2022-07-15 15:42:03
User avatar

I see you have an accepted solution now, which includes 'y' as a vowel.

chaitanyasheopurkar     2022-07-19 12:45:40
User avatar

Yeah that really bamboozled me

Please login and solve 5 problems to be able to post at forum