Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

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;
		}
}
Source by edabit.com #
 
PREVIOUS NEXT
Tagged: #Reverse #Coding #Challenge
ADD COMMENT
Topic
Name
9+4 =