-
大小: 3KB文件類型: .c金幣: 2下載: 1 次發(fā)布日期: 2021-01-03
- 語言: C/C++
- 標(biāo)簽: C語言??檔案??簡(jiǎn)明信息??生成??
資源簡(jiǎn)介
一個(gè)簡(jiǎn)單的C語言編寫的職工檔案及簡(jiǎn)明信息生成的系統(tǒng),可以輸入職工數(shù)據(jù),查詢,刪除,并生產(chǎn)簡(jiǎn)明信息
代碼片段和文件信息
#include
#include
#include
#include
#include
#define?NUM?10
extern?int?n=10;
struct?workers
{
char?num[10];
char?name[10];
char?sex[5];
int?age;
}wk[10];//10職工信息結(jié)構(gòu)數(shù)組
struct?worker
{
char?name[10];
int?age;
}wks[10];//10職工簡(jiǎn)明信息數(shù)組
void?readin();
void?display(struct?workers?*);
void?srt();
void?del();
int?menu_select();
void?main()
{ for(;;)
{
switch(menu_select())
{
case?1:
readin();
break;
case?2:
display(wk);
break;
case?3:
srt();
break;
case?4:
del();
break;
case?5:
printf(“Goodbye!\n“);
exit(0);
}
}
}
//菜單選擇操作
int?menu_select()
{ char?s[2];
int??cn;
printf(“?★1.輸入數(shù)據(jù)\n“);
printf(“?☆2.顯示原始數(shù)據(jù)\n“);
printf(
評(píng)論
共有 條評(píng)論