Console.WriteLine("你有房吗?");
string a = Console.ReadLine();
if (a=="有")
{
Console.WriteLine("结婚吧");
}
else if (a == "没有")
{
Console.WriteLine("你有钱吗?");
string b = Console.ReadLine();
if (b == "有")
{
Console.WriteLine("先买房再结婚");
}
else if (b == "没有")
{
Console.WriteLine("你有能力吗?");
}
else
{
Console.WriteLine("你输入有误");
}
string c = Console.ReadLine();
if (c == "有")
{
Console.WriteLine("先赚钱在买房 在结婚");
}
else if (c == "没有")
{
Console.WriteLine("拜拜");
}
}
else
{
Console.WriteLine("你输入有误");
}
}
Console.Write("请输入现在的时间:");
int shi = int.Parse(Console.ReadLine());
string str=(shi>12)?"am":"pm";
//时间大于12 的减去12,一定要在判断玩上午或者下午后
shi = (shi>12)?
Console.WriteLine("现在是"+str+shi+"点");
Console.WriteLine("请输入一个整数:");
int b = int.Parse(Console.ReadLine());
Console.WriteLine("请输入一个整数:");
int c= int.Parse(Console.ReadLine());
int min=(a<b&&a<c)?a:b;
min=(b<a&&b<c)?b:min;
min=(c<b&&c<a)?c:min;
int max=(a>b&&a>c)?a:b;
max=(b>a&&b>c)?b:max;
max=(c>b&&c>a)?c:max;
int mid = (min==a && max==c) ? b : a;
mid = (min == a && max ==b) ? c:mid;
mid = (min == b && max == c) ? a : mid;
mid = (min == b&& max == a) ? c : mid;
mid = (min == c && max == a) ? b : mid;
mid = (min == c && max == b) ?a : mid;
Console.WriteLine(min+""+mid+""+max);
Console.ReadLine();