static void Main(string[] args)
{
string job = "处长";//职务
switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
case "杂鱼": Console.Write("发五仁月饼"); break;
}
}
}
}
{
string job = "处长";//职务
switch (job)
{
case "局长": Console.Write("发双黄月饼"); break;
case "处长": Console.Write("发蛋黄月饼"); break;
case "科长": Console.Write("发枣泥月饼"); break;
case "杂鱼": Console.Write("发五仁月饼"); break;
}
}
}
}
2015-12-27
{ int[] score = new int[] { 29, 57, 61, 89,45, 70, 69 };
Console.WriteLine("Students who faild are: ");
for (int i = 0; i < score.Length; i++)
{
if (score[i] <60)
Console.WriteLine(score[i] + " ");
}
Console.WriteLine("Students who faild are: ");
for (int i = 0; i < score.Length; i++)
{
if (score[i] <60)
Console.WriteLine(score[i] + " ");
}
2015-12-27
namespace Test
{
class Program
{
static void Main(string[] args)
{
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y += 2;
Console.WriteLine(x-y);
Console.ReadLine();
}
}
}
{
class Program
{
static void Main(string[] args)
{
double x, y;
x = y = 2;//从右向左赋值,x、y的值都是2
x /= 0.5;
y += 2;
Console.WriteLine(x-y);
Console.ReadLine();
}
}
}
2015-12-24