Answers for "Reverse Coding Challenge 1"

C#
0

Reverse Coding Challenge 1

public class Program 
{	//"A4B5C2" ➞ "AAAABBBBBCC"	
	public static string MysteryFunc(string s) 
    {  string s2 = "";
        for (int i = 0; i < s.Length; i+=2)
        s2 += new string(s[i], int.Parse((s[i+1]).ToString()));
        return s2;
		}
}
Posted by: Guest on July-22-2021

C# Answers by Framework

Browse Popular Code Answers by Language