工资计算
#include<stdio.h>
int main(void) {
int g;
float z=NULL;
float a = 5 / 100.0;//住房公积金%5
float b = 5 / 100.0;//养老保险金%5
float c = 5 / 100.0;//医疗保险金%5
float d = 2 / 100.0;//失业保险金%2
float e = 1 / 100.0;//其他杂费%1
printf("请输入本月总工资:");
scanf_s("%d", &g);
//printf("%d", g);
printf("本月要扣除的费用为:\n");
a = g * a;
printf(" 住房公积金为:\t%.2f\n", a);
b = g * b;
printf(" 养老保险金为:\t%.2f\n", b);
c = g * c;
printf(" 医疗保险金为:\t%.2f\n", c);
d = g * d;
printf(" 失业保险金为:\t%.2f\n", d);
e = g * e;
printf(" 其他杂费为:\t%.2f\n", e);
z = g - (a + b + c + d + e);
printf(" 实际工资为:\t%.2f\n", z);
return 0;
}
float z=NULL;
** 对变量进行初始化**