lcf's Web Cote

Don't try to tie me down with those conventions.
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

个人所得税

Posted on 2007-10-15 09:35  Lcf  阅读(194)  评论(0编辑  收藏  举报
static void Main(string[] args)
        
{
            Console.Write(
"请输入你本月的收入:");
            
float earning = float.Parse(Console.ReadLine());
            
float revenue = earning - 800;
            
float tax = 0;
            
float[] bourn = 05002000500020000400006000080000100000 };
            
float[] taxrate = 51015202530354045 };

            
for (int i = bourn.Length - 1; i >= 0; i--)
            
{
                
float t = bourn[i];
                
if (revenue > t)
                
{
                    
float tmpTax = (revenue - t) * (taxrate[i] / 100);
                    tax 
+= tmpTax;

                    revenue 
= t;
                }

            }

            Console.WriteLine(
"你本月的收入为:{0},该月应缴所得税额为:{1},应缴纳的个人所得税额为:{2}", earning, earning - 800, tax);
            Console.Read();
        }