#include<stdio.h> void main() { setvbuf(stdout,NULL,_IONBF,0); char name[8]; int i=1; float PV,GS,BA,HS,HF,OCF,BAF,payable,S; /*setvbuf(stdout,NULL,_IONBF,0);*/ printf("请输入第%d员工的名字 ",i); scanf("%s",name); printf("请输入该员工的岗位工资、薪级工资 "); scanf("%f%f",&PV,&GS); printf("请输入该员工的基础补贴、住房补贴、住房基金、独生子女费 "); scanf("%f%f%f%f",&BA,&HS,&HF,&OCF); printf("%d%s ",i,name); BAF=(PV+GS+BA+HS+HF+OCF)*0.12; payable=PV+GS+BA+HS+HF+OCF; S=(PV+GS+BA+HS+HF+OCF)-BAF; printf("姓名 合计工资 实发工资"); printf("%8.2f %12.2f %12.2f ",name,payable,S); }