C语言程序设计教程第3版(谭浩强),习题7-3的源代码。*网上参考并VC 6.00上运行过的哦*

C语言程序设计教程第3版(谭浩强),习题7-3的源代码。*网上参考并VC 6.00上运行过的哦*,第1张

概述本文章向大家介绍C语言程序设计教程第3版(谭浩强),习题7-3的源代码。/*网上参考并VC 6.00上运行过的哦*/,主要包括C语言程序设计教程第3版(谭浩强),习题7-3的源代码。/*网上参考并VC 6.00上运行过的哦*/使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

#include


#include


#define N 3

struct stuff


{


 int num;


 char name[20];


 char sex;


 int age;


 int work_age;


 float wage;


 char add[30];


};


voID input(struct stuff*,int );


voID output(struct stuff*,int);

voID main()


{


 struct stuff st[N];


 input(st,N);


 output(st,N);


}

voID input(struct stuff *s,int n)


{


 int i;


 for(i=0;i


 {


  system("cls");


  printf("请输入第%d个记录n",i+1);


  printf("编号: ");


  scanf("%d",&s[i].num);


  printf("名字: ");


  scanf("%s",s[i].name);


  printf("性别: ");


  getchar();


  scanf("%c",&s[i].sex);


  printf("年龄: ");


  scanf("%d",&s[i].age);


  printf("工龄: ");


  scanf("%d",&s[i].work_age);


  printf("工资: ");


  scanf("%f",&s[i].w


  


  age);


  printf("地址: ");


  scanf("%s",s[i].add);


 }


}

voID output(struct stuff *s,int n)


{


 int i;


 printf("编号t名字t性别t年龄t工龄t工资t地址n");


 printf("----------------------------------------------------n");


 for(i=0;i


 {


  printf("%dt%st%ct%dt%dt%ft%sn",


   s[i].num,s[i].name,s[i].sex,s[i].age,s[i].work_age,s[i].wage,s[i].add);


 }

}

总结

以上是内存溢出为你收集整理的C语言程序设计教程第3版(谭浩强),习题7-3的源代码。/*网上参考并VC 6.00上运行过的哦*/全部内容,希望文章能够帮你解决C语言程序设计教程第3版(谭浩强),习题7-3的源代码。/*网上参考并VC 6.00上运行过的哦*/所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/1264321.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-08
下一篇 2022-06-08

发表评论

登录后才能评论

评论列表(0条)

保存