#include <stdio.h>
#include <string.h>
main()
{
	struct  worker
	{
     char bh[10];
	char xm[30];
	float gz;
	};
	
	struct worker z,x={"10","li ming",2000}, y={"12","wang yan",2500};
	/*结构体变量在定义时可以进行初始化*/
	printf("\n   编号  姓名     薪水");
	printf("\nx:%-5s%-6s%10.2f",x.bh,x.xm,x.gz);
	printf("\ny:%-5s%-6s%10.2f",y.bh,y.xm,y.gz);
	z=x;  x=y;  y=z;    /*交换两个结构体变量*/
	printf("\n交换后:");
	printf("\nx:%-5s%-6s%10.2f",x.bh,x.xm,x.gz);
	printf("\ny:%-5s%-6s%10.2f",y.bh,y.xm,y.gz);
}