朝发白帝城
代码
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static string s = "朝辞白帝彩云间,千里江陵一日还。两岸猿声啼不住,轻舟已过万重山。";
static void Main(string[] args)
{
//朝辞白帝彩云间,千里江陵一日还。 两岸猿声啼不住,轻舟已过万重山。
for (int i = 0; i < 8; i++)
{
for (int j = 0; j < 4; j++)
{
Console.Write(s[i+24-8*j]);
}
Console.WriteLine();
}
Console.WriteLine("--------------------------");
for (int n = 0; n < 8; n++)
{
System.Console.Write("{0}{1}{2}{3}", s[24 + n], s[16 + n], s[8 + n], s[0 + n]);
System.Console.WriteLine();
}
}
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
private static string s = "朝辞白帝彩云间,千里江陵一日还。两岸猿声啼不住,轻舟已过万重山。";
static void Main(string[] args)
{
//朝辞白帝彩云间,千里江陵一日还。 两岸猿声啼不住,轻舟已过万重山。
for (int i = 0; i < 8; i++)
{
for (int j = 0; j < 4; j++)
{
Console.Write(s[i+24-8*j]);
}
Console.WriteLine();
}
Console.WriteLine("--------------------------");
for (int n = 0; n < 8; n++)
{
System.Console.Write("{0}{1}{2}{3}", s[24 + n], s[16 + n], s[8 + n], s[0 + n]);
System.Console.WriteLine();
}
}
}
}
-------------------------------------------------
!!!作者:木由水 http://www.cnblogs.com/muyoushui