美文网首页
2018-11-01作业3

2018-11-01作业3

作者: 追魂_409e | 来源:发表于2018-11-01 09:33 被阅读0次

{

    class Program

    {

        static void Main(string[] args)

        {

            Console.WriteLine("请输入年龄");

            int age = Convert.ToInt32(Console.ReadLine());

            {

                if (age > 18)

                {

                    Console.WriteLine("可以查看");

                }

                else if (age < 10)

                {

                    Console.WriteLine("不允许查看");

                }

                else if (10 <= age && age < 18)

                {

                    Console.WriteLine("是否继续查看");

                    string s = Console.ReadLine();

                    {

                        if (s == "yes")

                        {

                            Console.WriteLine("请查看");

                        }

                        else if (s == "no")

                        {

                            Console.WriteLine("退出,你放弃查看");

                        }

                        Console.ReadKey();

                    }

                }

            }

        }

    }

}

相关文章

  • 2018-11-01作业3

    { class Program { static void Main(string[] args)...

  • 2018-11-01作业3

    Console.WriteLine("请输入年龄"); int year = Convert.ToInt32(Co...

  • 2018-11-01作业3

    Console.WriteLine("请输入用户名"); string name = Console.ReadLi...

  • 2018-11-01作业3

    namespace ConsoleApplication3{class Program{static void M...

  • 2018-11-01作业3

    Console .WriteLine ("用户名"); string yonghumoing=Console .R...

  • 2018-11-01

    2018-11-01 冰雨霞思 2018-11-01 13:40 · 字数 1768 · 阅读 0 · 日记本 区...

  • 和曾泽宇的聊天记录

    曾 和 koko 在微信上的聊天记录如下,请查收。 ————— 2018-11-01 ————— 曾泽宇 20:3...

  • 第一站:休斯顿第三天

    休斯顿第三天 2018-11-01 16:15:35 DAY3 活动 德州大学奥斯汀分校; 孵化器Capital ...

  • 2018-11-01作业

    using System; using System.Collections.Generic; using Sys...

  • 2018-11-01作业

    namespace ConsoleApplication1{class Program{static void M...

网友评论

      本文标题:2018-11-01作业3

      本文链接:https://www.haomeiwen.com/subject/qtstxqtx.html