[問題] C++問題

看板C_and_CPP作者 (MPower)時間15年前 (2009/02/20 07:13), 編輯推噓1(101)
留言2則, 2人參與, 最新討論串1/3 (看更多)
這題小弟想很久但還是不會用function來寫,請問誰可以幫個忙? write a function that has an double as a parameter and returns a double through the function call. The parameter is the income for a single person and the return value is the amount of income tax owed. Use the "Schedule X- single" table below. Write a main function to test the function you have written. You are REQUIRED to use nested if... else if....else if.....else to determain the caluclation to use for the tax. Schedule X- Single If taxable But not over The Tax is income is Over-- $0 $7550 10% of the amount over $0 $7550 $30650 $755 plus 15% of the amount over 7550 $30650 $74200 $4220.00 plus 25% of the amount over 30650 $74200 $154800 $15107.50 plus 28% of the amount over 74200 $154800 $336550 $37657.50 plus 33% of the amount over 154800 $336550 $ no limit $97653.00 plus 35% of the amount over 336550 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 71.199.79.106

02/20 11:46, , 1F
我還以為是要parse這張表 = =A
02/20 11:46, 1F

02/20 12:52, , 2F
我還以為這是發包的價錢 XD
02/20 12:52, 2F
文章代碼(AID): #19dUUGoO (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #19dUUGoO (C_and_CPP)