zoukankan      html  css  js  c++  java
  • c# 之五行地支

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace 求余数
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            private void button1_Click(object sender, EventArgs e)
            {
                int years = int.Parse(this.textBox1.Text);
                this.textBox2.Text = (years % 12).ToString();
                switch (this.textBox2.Text) 
                {
                    case "4":
                        this.label4.Text = "子-五行:阳水";
                        break;
                    case "5":
                        this.label4.Text = "丑-五行:阴土";
                        break;
                    case "6":
                        this.label4.Text = "寅-五行:阳木";
                        break;
                    case "7":
                        this.label4.Text = "卯-五行:阴木";
                        break;
                    case "8":
                        this.label4.Text = "辰-五行:阳土";
                        break;
                    case "9":
                        this.label4.Text = "巳-五行:阴火";
                        break;
                    case "10":
                        this.label4.Text = "午-五行:阳火";
                        break;
                    case "11":
                        this.label4.Text = "未-五行:阴土";
                        break;
                    case "0":
                        this.label4.Text = "申-五行:阳金";
                        break;
                    case "1":
                        this.label4.Text = "酉-五行:阴金";
                        break;
                    case "2":
                        this.label4.Text = "戌-五行:阳土";
                        break;
                    case "3":
                        this.label4.Text = "亥-五行:阴水";
                        break;
                        
                }
            }
        }
    }
    

      

    子 阳水 4
    丑 阴土 5
    寅 阳木 6
    卯 阴木 7
    辰 阳土 8
    巳 阴火 9
    午 阳火 10
    未 阴土 11
    申 阳金 0
    酉 阴金 1
    戌 阳土 2
    亥 阴水 3


    甲 阳木 4
    已 阴木 5

    丙 阳火 6
    丁 阴火 7

    戊 阳土 8
    己 阴土 9

    庚 阳金 0
    辛 阴金 1

    壬 阳水 2
    葵 阴水 3

  • 相关阅读:
    scala 基础
    Feign拦截器和解码器
    SpringCloud对使用者透明的数据同步组件
    POI SXSSF API 导出1000万数据示例
    HDFS文件浏览页返回上级目录功能
    Spring Security OAuth2.0
    Spring Security实现OAuth2.0授权服务
    Spring Security实现OAuth2.0授权服务
    Zookeeper学习笔记:简单注册中心
    Eclipse集成Git做团队开发:分支管理
  • 原文地址:https://www.cnblogs.com/mengluo/p/5735806.html
Copyright © 2011-2022 走看看