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("房子都没有住大街上吗");
                    }

  • 相关阅读:
    28. css样式中px转rem
    27.用webpack自搭react和vue框架
    26.webpack 入门
    25.redux回顾,redux中的action函数异步
    24.redux
    23.react-router 路由
    22.2、react生命周期与react脚手架(二)
    22.1 、react生命周期(一)
    21.react 组件通信
    const关键字的作用
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4374262.html
Copyright © 2011-2022 走看看