fork download
  1. using System;
  2. using System.Linq;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. var s = "cC-Cc";
  9. var result = string.Join("-", s.Split('-').Select((x,i) => i % 2 == 0 ? x.ToLower() :x.ToUpper()));
  10. Console.WriteLine(result);
  11. }
  12. }
Success #stdin #stdout 0.02s 15612KB
stdin
Standard input is empty
stdout
cc-CC