Skip to content

Sgreid7/ExplosiveAPIs

Repository files navigation

Objectives

Includes

Featured Code

Kata Controller

public class ExplosionController : ControllerBase
  {
    [HttpGet("explode")]

    public string Explode(string s)
    {
      // split string into numbers
      var answerString = "";
      foreach (var letter in s)
      {
        var number = int.Parse(letter.ToString());
        // find the value of each number
        // duplicate the number value times
        for (var i = 0; i < number; i++)
        {
          answerString += letter;
        }
      }
      // return a copy of the numbers duplicated
      return answerString;
    }
  }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages