static void Main(string[] args) { string s = null; //因为楼主要求26个英文字母,所以i<26 for (int i = 0; i < 26; i++) { //将数字转换为对应的ascii码即a b c d ........思路真好,享受中哈哈! s += (char)(97 + i) + " "; //输出 Console.WriteLine(s); } Console.ReadLine(); }
Console.WriteLine(@"a a b a b c a b c d …… … a b c … z");
static void Main(string[] args)
{
char[] c = new char[]{'a','b','c','d','e','f','g'};
for (int i = 0; i < c.Length; i++)
{
for (int j = 0; j < i; j++)
{
Console.Write(c[j]);
}
Console.Write('\n');
}
}
static void Main(string[] args)
{
string s = null;
for (int i = 0; i < 26; i++)
{
s += (char)(97 + i) + " ";
Console.WriteLine(s);
}
Console.ReadLine();
}
console.wright("ab");
console.wright("abc");
console.wright("abcd");
console.wright("abcd...z")
static void Main(string[] args)
{
string s = null;
//因为楼主要求26个英文字母,所以i<26
for (int i = 0; i < 26; i++)
{
//将数字转换为对应的ascii码即a b c d ........思路真好,享受中哈哈!
s += (char)(97 + i) + " ";
//输出
Console.WriteLine(s);
}
Console.ReadLine();
}
a b
a b c
a b c d
……
…
a b c … z");