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


        class Program
        {
            static void Main(string[] args)
            {
                while (true)
                {
                    string a;
                    Console.WriteLine("请问你有房吗:");
                    a = Console.ReadLine();
                    if (a == "有")
                    {
                        Console.WriteLine("请问你有车吗:");
                        a = Console.ReadLine();
                        if (a == "有")
                        {
                            Console.WriteLine("请问你有钱吗:");
                            a = Console.ReadLine();
                            if (a == "有")
                            {
                                Console.WriteLine("结婚吧");
                            }
                            else
                            {
                                Console.WriteLine("没钱吃什么");
                            }
                        }
                        else
                        {
                            Console.WriteLine("没车你来干什么");
                        }

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

                    Console.ReadLine();
                }
            }
        }
    }

  • 相关阅读:
    MySQL++:Liunx
    MySQL++:liunx 安装 MySQL
    MySQL++:MySQL 相关机制参数解释说明
    linux++:Linux
    linux++:基本操作命令
    coding++:java正则表达式获取指定HTML标签的指定属性值
    mongodb++:mongodb 基本语法
    xml模块
    shelve模块简单用法
    shutil模块
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4375624.html
Copyright © 2011-2022 走看看