我需要一个简单的解决方案来解决C#
中的问题输入:任何身体都可以跳舞
输出:ABCD
答案 0 :(得分:2)
string inputString = "Another One Bites The Dust And Another One Down";
string[] split = inputString.Split();
foreach (string s in split)
{
Console.Write(s.Substring(0,1));
}
答案 1 :(得分:1)
检查出来:
string s = new string("Any Body Can Dance"
.Split(' ')
.Select(x => x.First())
.ToArray());
Console.WriteLine(s);