使用c语言设计一个计算器,要求可以计算个人所得税?

Python09

使用c语言设计一个计算器,要求可以计算个人所得税?,第1张

#include"stdio.h"\x0d\x0adouble count(int a,int b)\x0d\x0a{\x0d\x0a double c=a-b-3500\x0d\x0a if(c>>注意:请输入1或2 回答于 2022-12-11

代码文本:

#include "stdio.h"

int main(int argc,char *argv[]){

double x,tax

printf("Please enter the number salary, negative end...\n")

while(scanf("%lf",&x),x>=0){

if(x>=5000)

tax=(x-5000)*0.2+4200*.03

else if(x>=800 &&x<5000)

tax=(x-800)*.03

else

tax=0

printf("You should pay %.2f yuan.\n",tax)

}

return 0

}