if (money >= 100000)
{
Console.WriteLine("送一台微波炉");
}
else
{
if (money > 50000)
Console.WriteLine("送一套茶具");
else
if (money >= 10000)
Console.WriteLine("送一袋大米");
else
Console.WriteLine("没有礼品");
}
{
Console.WriteLine("送一台微波炉");
}
else
{
if (money > 50000)
Console.WriteLine("送一套茶具");
else
if (money >= 10000)
Console.WriteLine("送一袋大米");
else
Console.WriteLine("没有礼品");
}
if (x >= y)
{
if (x >= 5)
Console.WriteLine("5");
}
{
if (x >= 5)
Console.WriteLine("5");
}
2016-03-22
static void Main(string[] args)
{
int x=1;
bool a = ++x * x > 3;
bool b = ++x*2>3;//请赋值
Console.WriteLine(a||b);
}
{
int x=1;
bool a = ++x * x > 3;
bool b = ++x*2>3;//请赋值
Console.WriteLine(a||b);
}
2016-03-22
for (int y = 1; y <= 7; y++)
{
for (int x = 1; x <= 7; x++)
{
if (x > y)
continue;
Console.Write(x);
}
Console.WriteLine();//换行
}
{
for (int x = 1; x <= 7; x++)
{
if (x > y)
continue;
Console.Write(x);
}
Console.WriteLine();//换行
}
2016-03-21
namespace Test
{
class Program
{
static void Main(string[] args)
{
for (int x = 1; x < 10; x++)
{
if(x==3||x==8) //请添加代码,过滤3和8
continue;
Console.Write(x);
}
}
}
}
{
class Program
{
static void Main(string[] args)
{
for (int x = 1; x < 10; x++)
{
if(x==3||x==8) //请添加代码,过滤3和8
continue;
Console.Write(x);
}
}
}
}
2016-03-21