职工信息系统
源程序:
#include<stdio.h>
#define max 50
struct staff
{
char name[20];
char num[10];
char sex[10];
char age[10];
char degree[10];
char wage[10];
char phone[15];
char address[50];
}worker; /*定义一个职工信息结构体*/
char filename[20];
FILE *fp;
void creat(); /*声明一个输入信息的函数*/
void output(); /*声明一个输出函数*/
void search(); /*声明一个查找函数*/
void add(); /*声明一个添加函数*/
void correct(); /*声明一个修改函数*/
void delete(); /*声明一个删除函数*/
void sort(); /*声明一个排序函数*/
void main()
{
int m;
do
{
printf(" *********************************************** ");
printf(" ZHI GONG XIN XI GUAN lI XI TONG ");
printf(" *********************************************** ");
printf(" 1---creat the file ");
printf(" 2---add the information ");
printf(" 3---search the information ");
printf(" 4---correct the information ");
printf(" 5---delete the information ");
printf(" 6---output the information ");
printf(" 7---sort the information ");