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
轉載于:https://www.cnblogs.com/mengluo/p/5735806.html
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
- 上一篇: (mysql) EXPLAIN语法
- 下一篇: (计算机组成原理)第二章数据的表示和运算