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();
                }
            }
        }
    }

  • 相关阅读:
    转:Oracle中的日期和字符串互相转换
    jQuery DateTimePicker 日期和时间插件
    js转换时间戳-转换成 yyyy-MM-dd HH:mm:ss
    linux下载服务器上的文件命令-sz
    eclipse中集成maven
    maven的安装和环境配置
    eclipse复制粘贴变卡的解决办法
    在表单提交之前做校验-利用jQuery的submit方法
    centos7 ipaddr 无法查看虚拟机IP解决办法
    linux下tomcat启动很慢的解决办法
  • 原文地址:https://www.cnblogs.com/lk-kk/p/4375624.html
Copyright © 2011-2022 走看看