csharp basic exercises: There are no vowels in there? [Difficulty: 0] - view the C # programming classic exam, exercises of varying difficulty C #, C # novice suitable for self-study of advanced training

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_45444821/article/details/102714734

csharp basic exercises: There are no vowels in there? [Difficulty: 0]:

A matrix array of a given number, check number is any lowercase vowel character code ( 'A, E, I, O, u`).

If so, change the value arrays vowel strings.

Returns an array of get.

Programming objectives:

public class Kata
{
  public static object[] IsVow(object[] a)
  {
    return a;
  }
}


Test sample:

namespace Solution 
{
  using NUnit.Framework;
  using System;
  [TestFixture]
  public class KataTests
  {
    [Test]
    {
      Assert.AreEqual(new object[] { 118, "u",120,121,"u",98,122,"a",120,106,104,116,113,114,113,120,106 }, Kata.IsVow(new object[] { 118,117,120,121,117,98,122,97,120,106,104,116,113,114,113,120,106 }));
      Assert.AreEqual(new object[] { "e",121,110,113,113,103,121,121,"e",107,103 }, Kata.IsVow(new object[] { 101,121,110,113,113,103,121,121,101,107,103 }));
    }
  }
}


Best answer (multiple solutions):

Click to view answer

More related topics:

Disclaimer

This blog All programming topics and answers were collected from the Internet, users are mainly used for study and reference, if any violation of your rights, please contact the administrator to delete, thank
entitled to collect https://www.codewars.com/
HTTPS: / /www.codewars.com/kata/is-there-a-vowel-in-there

Guess you like

Origin blog.csdn.net/weixin_45444821/article/details/102714734