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 Listl=new List { 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<){ 51 return m * 0.03; 52 } 53 else if (m < ) { 54 55 return (m - ) * 0.1 + * 0.03; 56 } 57 else if (m < ) 58 { 59 60 return (m-)*0.2+( - ) *0.1 + * 0.03; 61 } 62 else if (m < ) 63 { 64 65 return (m - ) * 0.25 + ( - ) * 0.2 + ( - ) * 0.1 + * 0.03; 66 } 67 else if (m < ) 68 { 69 70 return (m - ) * 0.3 + ( - ) * 0.25 + ( - ) * 0.2 + ( - ) * 0.1 + * 0.03; 71 } 72 else if (m < ) 73 { 74 75 return (m-) * 0.35 +( - ) * 0.3 + ( - ) * 0.25 + ( - ) * 0.2 + ( - ) * 0.1 + * 0.03; 76 } 77 else { 78 return (m-)*0.45+ ( - ) * 0.35 - ( - ) * 0.3 + ( - ) * 0.25 + ( - ) * 0.2 + ( - ) * 0.1 + * 0.03; 79 } 80 } 81 } 82 }
2019年新个税计算器及源代码
作者:2019年新个税计算器及源代码 来源:未知 2022-06-21 09:07 阅读:次
1usingSystem;2usingSystem.Collections.Generic;3usingSystem.ComponentModel;4usingSystem.Data;

