zoukankan      html  css  js  c++  java
  • 函数

    // 剪子 包袱 锤
    //Console.Write("请输入你输什么拳");
    //string shu = Console.ReadLine();
    //if (shu == "剪刀" || shu == "石头" || shu == "布")
    //{
    // int ren = 0;
    // switch (shu)
    // {

    // case "剪刀 ":
    // ren = 1;
    // break;
    // case "石头":
    // ren = 2;
    // break;
    // case "布":
    // ren = 3;
    // break;


    // }
    // Random ran = new Random();
    // int b = ran.Next(1, 4);
    // switch (b)
    // {
    // case 1:
    // Console.WriteLine("电脑出剪刀");

    // break;
    // case 2:
    // Console.WriteLine("电脑出石头");

    // break;
    // case 3:
    // Console.WriteLine("电脑出布");

    // break;

    // }
    // int c = ren - b;
    // if (c == 0)
    // {
    // Console.WriteLine("本轮平局");
    // }
    // else if (c == 1 || c == -2)
    // {
    // Console.WriteLine("本轮胜出");
    // }
    // else
    // {
    // Console.WriteLine("本轮失败");
    // }
    //}
    //else
    //{
    // Console.WriteLine("您的输入有误!");
    //}

    //Console.ReadLine();

    //格式一:
    //Program hanshu = new Program();
    //hanshu.cai();
    //格式二
    //Program hanshu = new Program();

    //string a = hanshu.cai1();
    //Console.WriteLine(a );
    //Console.ReadLine();
    //格式三
    //Program hanshu = new Program();
    //Console.Write("请输入你输什么拳");
    //string shu = Console.ReadLine();

    //string a = hanshu.cai2(shu);
    //Console.WriteLine(a);
    //Console.ReadLine();
    //格式四
    //Program hanshu = new Program();
    //Console.Write("请输入你输什么拳");
    //string shu = Console.ReadLine();
    //hanshu.cai3(shu);

    练习

    //for (int i = 1; i > 0; i++)
    //{
    // Console.Write("请输入年份:");
    // int n = int.Parse(Console.ReadLine());
    // if (n > 0 && n <= 9999)
    // {
    // Console.Write("请输入月份:");
    // int y = int.Parse(Console.ReadLine());
    // for (int j = 0; j <= 12; j++)
    // {
    // if (y >= 1 && y <= 12)
    // {
    // Console.Write("请输入日期:");
    // int d = int.Parse(Console.ReadLine());
    // for (int k = 0; k <= 31; k++)
    // {
    // if (d >= 1 && d <= 31)
    // {
    // if (y == 1 || y == 3 || y == 5 || y == 7 || y == 8 || y == 10 || y == 12)
    // {
    // Console.WriteLine("您输入正确:{0}年{1}月{2}日", n, y, d);
    // break;

    // }
    // else if (y == 4 || y == 6 || y == 9 || y == 11)
    // {
    // if (d <= 30)
    // {
    // Console.WriteLine("您输入正确:{0}年{1}月{2}日", n, y, d);
    // break;
    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;
    // }
    // }
    // else//2yue
    // {
    // if (d <= 28)
    // {
    // Console.WriteLine("您输入正确:{0}年{1}月{2}日", n, y, d);
    // break;
    // }
    // else if (d == 29)
    // {
    // if (n % 4 == 0 && n % 100 != 0 || n % 400 == 0)
    // {
    // Console.WriteLine("您输入正确:{0}年{1}月{2}日", n, y, d);
    // break;
    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;
    // }
    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;
    // }
    // }


    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;
    // }
    // } break;
    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;

    // }

    // }
    // }
    // else
    // {
    // Console.WriteLine("您的输入有误,请重新输入!");
    // continue;
    // }
    // break;
    //}
    //Console.ReadLine();


    //Console.Write("请输入你的性别:");
    //String x = Console.ReadLine();
    //Console.Write("请输入你的身高:");
    //double g = double.Parse(Console.ReadLine());
    //Console.Write("请输入你的体重:");
    //double t = double.Parse(Console.ReadLine());
    //if (x == "男" || x == "女")
    //{
    // if (x == "男")
    // {
    // if (t > g - 100 + 3)
    // {
    // Console.WriteLine("您太重了!");
    // }
    // else if (t < g - 100 + 3)
    // {
    // Console.WriteLine("您太瘦了!");
    // }
    // else
    // {
    // Console.WriteLine("您很健康!");
    // }

    // }
    // else
    // {
    // if (t > g - 110 + 3)
    // {
    // Console.WriteLine("您太重了!");
    // }
    // else if (t < g - 110 + 3)
    // {
    // Console.WriteLine("您太瘦了!");
    // }
    // else
    // {
    // Console.WriteLine("您很健康!");
    // }
    // }
    //}
    //else
    //{
    // Console.WriteLine("您在搞笑?");
    //}
    //Console.ReadLine();

  • 相关阅读:
    python 日期、时间戳转换
    判断任意数字是否为素数
    linux使用工具记录
    python日志记录-logging模块
    python特性、属性以及私有化
    python 装饰器、内部函数、闭包简单理解
    sql语句操作记录
    virtualBox使用nat模式下ssh连接
    git常用操作
    分布式CAP定理(转)
  • 原文地址:https://www.cnblogs.com/yx1314520/p/5723339.html
Copyright © 2011-2022 走看看