天天看点

收入与税收

#include <stdio.h>
#include <stdlib.h>

typedef struct wage
{
    char name[];
    int jbm;
    int gwm;
    int jtm;

}WAGE;
int sd(float a)
{    float gs;
    if(a>&&a<=)
    gs=a*(/)-;
else if(a>&&a<=)
    gs=a*(/)-;
else if(a>&&a<=)
    gs=a*(/)-;
else if(a>&&a<=)
    gs=a*(/)-;
else if(a>&&a<=)
    gs=a*(/)-;
else if(a>&&a<=)
    gs=a*(/)-;
else if(a>)
    gs=a*(/)-;
   return gs;
}
int main()
{
    int i;
    float sum[],s[],m[];
    WAGE peo[]={
        {"刘",,,},
        {"张",,,},
        {"郭",,,},
        {"成",,,},
        {"皮吉",,,}
        };
   printf("姓名\t基本工资\t岗位工资\t津贴工资\t税后收入\t个人税收\n");
   for(i=;i<5;i++)
   {
       sum[i]=peo[i].jbm+peo[i].gwm+peo[i].jtm;
       s[i]=sd(sum[i]);
       m[i]=sum[i]-s[i];
       printf("%s\t%d\t%d\t%d\t%f\t%f\n",peo[i].name,peo[i].jbm,peo[i].gwm,peo[i].jtm,sum[i],s[i],m[i]);
   }

}

           
收入与税收