int x = 1;
do
{
x++;
Console.Write(x+" ");
}
while(x>1&&x<=4);
do
{
x++;
Console.Write(x+" ");
}
while(x>1&&x<=4);
2016-08-28
EXQ ME?
class Program
{
static void Main(string[] args)
{
int x = 5;
int y = 5;
int z = 5;
x++;
Console.Write(x);
Console.Write(++y);
Console.Write(++z);
}
}
}/*
为啥你们的那么麻烦?
*/
class Program
{
static void Main(string[] args)
{
int x = 5;
int y = 5;
int z = 5;
x++;
Console.Write(x);
Console.Write(++y);
Console.Write(++z);
}
}
}/*
为啥你们的那么麻烦?
*/
2016-08-25
int w = 1;int e = 7;
for (int x=1;x<=7;x++)
{
for (int y=1;y<=7;y++)
{
if( y==w||y==e)
Console.Write("0");
else
Console.Write(".");
}
w++;
e--;
Console.WriteLine();
for (int x=1;x<=7;x++)
{
for (int y=1;y<=7;y++)
{
if( y==w||y==e)
Console.Write("0");
else
Console.Write(".");
}
w++;
e--;
Console.WriteLine();
VS上可以运行
int c = 1;
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if (x == c)
break;
}
c++;
Console.WriteLine();//换行
}
int c = 1;
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
Console.Write(x);
if (x == c)
break;
}
c++;
Console.WriteLine();//换行
}
2016-08-23