class
DrawHeart
{
static
void
Main()
{
for
(
int
i = 0, m = 1; i < 30; i++)
for
(
int
l = 0; l <
new
[] { 5, 6, 7, 6, 8, 10, 3, 10, 4, 13, 1, 13, 1, 87, 1, 27, 4, 23, 7, 20, 11, 16, 16, 11, 20, 7, 24, 3, 27, 1 }[i]; l++, m++)
System.Console.Write((i % 2 > 0 ?
"love"
[m % 4] :
' '
) + (m % 29 > 0 ?
""
:
"\n"
));
Console.ReadLine();
}
}
第二个
string outString = "*";//输出的字
for (int i = 1; i <= 8; i++)
{
for (int j = 1; j <= 9; j++)
{
if (((i == 1) && ((j == 5) || (j == 1) || (j == 9))) || ((i >= 4) && ((j <= i - 3) || (j >= 13 - i))))
{
Console.Write(" ");
}
else
{
Console.Write(" "+outString);//英文或是字符,符号输出方式
// Console.Write(outString);//中文输出方式
}
}
Console.WriteLine("");
}