#include
#include
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
struct Worker{
int Number;
char Name[50] ;
int Age;
float Salary;
};
int main(int argc, char *argv[]) {
int i=0;
for(;i<10;i++){
struct Worker work;
printf("请输入第%d个员工信息:\n",i+1);
//scanf("%d%s%d%f",work.Number,work.Name,work.Age,work.Salary);
printf("工号:");
scanf("%d",&work.Number);
printf("姓名:");
scanf("%s",&work.Name);
printf("年龄:");
scanf("%d",&work.Age);
printf("工资:");
scanf("%f",&work.Salary);
printf("输入完成!信息如下:\n");
printf("工号:%d,姓名:%s,年龄:%d,工资:%.2f",work.Number,work.Name,work.Age,work.Salary);
}
return 0;
}
打码不容易,望采纳谢谢!