請高手幫我解決一下這個問題,這個試用C語言在Dev c++環境下開發的,我不管輸入多少金額出來的稅都是0= =
程式碼如下:
#include <stdio.h>
#include <stdlib.h>
int main()
{
long income;
float tax;
printf("這個是計算稅的程式!!\n");
printf("請輸入收入值:");
scanf("income:%ld\n", &income);
if(income<=370,000) tax= income*0.06;
if(income>370000 && income<=990000) tax=370000*0.06+(income-370000)*0.13;
if(income>990000 && income<=1980000)
tax=370000*0.06+620000*0.13+(income-990000)*0.21;
if(income>1980000 && income<=37200000)
tax=37000*0.06+620000*0.13+990000*0.21+(income-1980000)*0.3;
if(income>37200000)
tax=37000*0.06+620000*0.13+990000*0.21+1220000*0.3+(income-3720000)*0.4;
printf("你所要繳交的稅金=%.2f\n", tax);
getch();
return 0;
}