2019年新個稅計算器及源代碼

 可以到https://download.csdn.net/download/shashoudouhenleng/10873977 下載  也可以到以下地址下載

計算器下載地址   https://files.cnblogs.com/files/huanglei2010/%E4%B8%AA%E7%A8%8E%E8%AE%A1%E7%AE%97%E5%99%A8v01.rar

下載後解壓爲exe可執行文件

雙擊直接運行exe文件

2019年新個稅出來以後爲了算着方便,用半個小時拖了幾個控件,隨隨便便寫了個計算器,

邏輯很簡單,可用用來參考着算自己,應該繳納的個人所得稅,

本計算器,只供參考,不保證數據的準確性。

 

 

 

 

計算器下載地址   https://files.cnblogs.com/files/huanglei2010/%E4%B8%AA%E7%A8%8E%E8%AE%A1%E7%AE%97%E5%99%A8v01.rar

下載後解壓爲exe可執行文件

雙擊直接運行exe文件

2019年新個稅出來以後爲了算着方便,用半個小時拖了幾個控件,隨隨便便寫了個計算器,

邏輯很簡單,可用用來參考着算自己,應該繳納的個人所得稅,

本計算器,只供參考,不保證數據的準確性。

計算器源代碼非常簡單總共82行 如下

 1 using System;
 2 using System.Collections.Generic;
 3 using System.ComponentModel;
 4 using System.Data;
 5 using System.Drawing;
 6 using System.Linq;
 7 using System.Text;
 8 using System.Windows.Forms;
 9 namespace 個稅計算器v01
10 {
11     public partial class Form1 : Form
12     {
13         public Form1()
14         {
15             InitializeComponent();
16 
17             textBox1.Text = "0";
18             textBox2.Text = "0";
19             textBox3.Text = "0";
20             textBox4.Text = "0";
21             textBox5.Text = "0";
22         }
23         private void button1_Click(object sender, EventArgs e)
24         {
25             double t1 = double.Parse(textBox1.Text);
26             double t2 = double.Parse(textBox2.Text);
27             double t3 = double.Parse(textBox3.Text);
28             double t4 = double.Parse(textBox4.Text);
29             double t5 = double.Parse(textBox5.Text);
30             double t6 = t1 - t2 - t3 - t4 - t5;
31             double d = 0;
32             MessageBox.Show(t6.ToString());
33             List<TextBox> l = new List<TextBox>{ 
34             textBox01,textBox02,textBox03,textBox04,
35             textBox05,textBox06,textBox07,textBox08,
36             textBox09,textBox10,textBox11,textBox12
37             };
38             for (int i = 0; i < l.Count; i++)
39             {
40                 TextBox tbs = l[i];
41                 double ts = Comput(i+1, t6) - d;
42                 tbs.Text=ts.ToString();
43                 d+=ts;
44             }
45             textBox13.Text = d.ToString();
46  
47         }
48         public static double Comput(int n,double f){
49             double m = n * f;
50             if(m<36000){
51                 return m * 0.03;
52             }
53             else if (m < 144000) {
54 
55                 return (m - 36000) * 0.1 + 36000 * 0.03;
56             }
57             else if (m < 300000)
58             {
59 
60                 return (m-144000)*0.2+(144000 - 36000) *0.1 + 36000 * 0.03;
61             }
62             else if (m < 420000)
63             {
64 
65                 return (m - 300000) * 0.25 + (300000 - 144000) * 0.2 + (144000 - 36000) * 0.1 + 36000 * 0.03;
66             }
67             else if (m < 660000)
68             {
69 
70                 return (m - 420000) * 0.3 + (420000 - 300000) * 0.25 + (300000 - 144000) * 0.2 + (144000 - 36000) * 0.1 + 36000 * 0.03;
71             }
72             else if (m < 960000)
73             {
74 
75                 return (m-660000) * 0.35 +(660000 - 420000) * 0.3 + (420000 - 300000) * 0.25 + (300000 - 144000) * 0.2 + (144000 - 36000) * 0.1 + 36000 * 0.03;
76             }
77             else {
78                 return (m-960000)*0.45+ (960000 - 660000) * 0.35 - (660000 - 420000) * 0.3 + (420000 - 300000) * 0.25 + (300000 - 144000) * 0.2 + (144000 - 36000) * 0.1 + 36000 * 0.03;
79             }
80         }
81     }
82 }

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章