zoukankan      html  css  js  c++  java
  • 利用if else来运行咱们结婚吧


            static void Main(string[] args)
            {
                while (true)
                {
                    string a;
                    Console.WriteLine("请问你有房吗:");
                    a = Console.ReadLine();
                    if (a == "有")
                    {
                        Console.WriteLine("请问你有车吗:");
                        a = Console.ReadLine();
                        if (a == "有")
                        {                                                                              //主要运动if else的嵌套。。 注意嵌套的if else 要一块打,不然会很难分清;
                            Console.WriteLine("请问你有钱吗:");
                            a = Console.ReadLine();
                            if (a == "有")
                            {
                                Console.WriteLine("结婚吧");
                            }
                            else
                            {
                                Console.WriteLine("没钱吃什么");
                            }
                        }
                        else
                        {
                            Console.WriteLine("没车你来干什么");
                        }

                    }
                    else
                    {
                        Console.WriteLine("房子都没有住大街上吗");
                    }

  • 相关阅读:
    jQuery常用方法总结
    如何让div显示在最上层(页面含Flash)
    Flex分页控件
    C#利用SharpZipLib解压或压缩文件夹实例操作
    3D 穿梭效果?使用 UWP 也能搞定
    [WPF] 制作一个彩虹按钮
    [WPF] 仅用 Rectangle 实现圆柱形进度条
    [WPF] 玩玩彩虹文字及动画
    Skipping Windows Azure Startup Tasks When Running in the Emulator
    [转] Asp.net mvc 3 beta 新特性介绍
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4374262.html
Copyright © 2011-2022 走看看