110,534
社区成员
发帖
与我相关
我的任务
分享
class Program
{
static void Main(string[] args)
{
栋笃笑 黄子华 = new 栋笃笑();
Console.WriteLine("铁达尼号还没撞冰山?");
Boolean 直 = Console.ReadLine();
Console.WriteLine("铁达尼号撞了冰山并且已经弯曲?");
Boolean 弯 = Console.ReadLine();
黄子华.船(直,弯);
}
}
public class 栋笃笑
{
public string 船(Boolean 直,Boolean 弯)
{
if (直 == true)
{
Console.WriteLine("我们的船是全世界最大最安全的豪华游轮");
}
if (弯 == true)
{
Console.WriteLine("不用怕!船到桥头自然直,撞到冰山特别弯!");
}
else
{
Console.WriteLine("果然是全世界最大最安全的豪华游轮,撞了冰山都没弯曲!");
}
if (直 == true && 弯 == true)
{
Console.WriteLine("不直也要撞直!");
}
}
}