c语言物业管理系统

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
scanf("%d",&n);
if (n != 1)
break;
}
else
{
clear;
printf("\t--请输入用户- %s -修改后信息--",p -> name);
printf("姓名性别身份证联系方式楼号单元号房号平米数每平米价格备注");
scanf("%s",(*p).name);
scanf("%d",&(*p).sex);
{
printf("没有任何数据");
exit(1);
}
else
{
head = Getdata(fp);
del(head);
menu_1();
}
break;
}
case 4:
{
menu_2();
break;
}
case 5:
{
fp = fopen("","rb");
head = Getdata(fp);
if (head == NULL)
int unit_num;
int house_num;
float area;
float area_price;
float charge;
char remarks[200];
struct per *next;
}PERSON;
void zhuce ();
int login ();
PERSON *Getdata (FILE *fp);
scanf("%s",ID);
while (p -> next != NULL)
{
if (strcmp(p -> name,name) == 0 && strcmp(p -> IDcard,ID) == 0)
{
k = 1;
break;
}
p = p -> next;
}
if (k == 0)
{
printf("没有查找到该用户,是否重新输入(1.是;0.否)\n--");
scanf("%s",(*p).IDcard);
scanf("%s",(*p).phone);
scanf("%d",&(*p).build_num);
scanf("%d",&(*p).unit_num);
scanf("%d",&(*p).house_num);
scanf("%f",&(*p).area);
#include<>
#define clear system("cls")
#endif
#define TRUE 1
#define FAUSE 0
typedef struct per
{
char name[20];
int sex;
char IDcard[19];
char phone[12];
int build_num;
scanf("%s %s",name,ID);
p = head;
while (p -> next != NULL)
{
if (strcmp(p -> name,name) == 0 && strcmp(p -> IDcard,ID) == 0)
scanf("%d",&a);
clear;
switch(a)
{
case 0:
{
printf("--感谢使用!--");
Sleep(3000);
exit(0);
}
case 1:
{
add_person();
menu_1();
break;
}
caFra Baidu biblioteke 2:
{
fp = fopen("","r");
head = Getdata(fp);
{
printf ("\n用户名或密码错误。");
Sleep(2000);
clear;
check = login();
}
clear;
menu_1();
break;
}
}
return 0;
}
void menu_1 ()
{
FILE *fp;
int a;
PERSON *head = NULL;
printf("\t\t*************************欢迎使用***************************");
if (n == 0)
break;
}
}
save(head);
}
void change (PERSON *L)
{
char name[20],ID[19];
PERSON *p;
int n,k = 0;
while (1)
{
p = L;
printf("--请输入所需修改用户的姓名及身份证--\n--");
scanf("%s",name);
printf("\n\t\t1.按楼号查看用户物业费情况");
printf("\n\t\t2.按费用信息查看用户物业费情况");
printf("\n\t\t0.退出");
printf("\n\t--请输入--:");
scanf("%d",&a);
clear;
switch(a)
{
case 0:
{
printf("感谢使用");
scanf("%s",(*p1).remarks);
(*p1).charge = (*p1).area * (*p1).area_price * (-1);
if (head = NULL)
head = p2 = p1;
else
{
p2 ->next = p1;
p2 = p1;
}
printf("\n\t--用户添加成功!--");
{
printf("没有任何数据");
Sleep(3000);
exit(1);
}
else
{
pay(head);
menu_1();
}
break;
}
}
}
void menu_2 ()
{
FILE *fp;
int a;
PERSON *head = NULL;
printf("\t\t*******用户信息查看**********");
Sleep(3000);
exit(0);
}
case 1:
{
fp = fopen("","rb");
head = Getdata(fp);
if (head == NULL)
{
printf("没有任何数据");
Sleep(3000);
exit(1);
}
else
{
sort_B_num(head);
menu_2();
scanf("%f",&(*p).area_price);
scanf("%s",(*p).remarks);
(*p).charge = (*p).area * (*p).area_price;
printf("修改用户成功\n是否继续修改(1.是;0.否)");
scanf("%d",&n);
if (n != 1)
}
break;
}
case 2:
{
fp = fopen("","rb");
head = Getdata(fp);
if (head == NULL)
{
printf("没有任何数据");
Sleep(3000);
exit(1);
}
else
{
printf("\t\t--所有用户物业费情况--\n");
sort_All(head);
printf("\n\t\t0.退出");
printf("\n\t--请输入--: ");
scanf("%d",&a);
clear;
switch(a)
{
case 0:
{
printf("\t\t--感谢使用本系统!--");
Sleep(2000);
exit(0);
}
case 1:
{
zhuce();
clear;
void menu_2 ();
int main ()
{
int check,a;
printf("\t************************** Welcome !***********************");
printf("\n\t\t1.注册");
printf("\n\t\t2.登录");
printf("\n\t\t1.用户添加");
printf("\n\t\t2.用户修改");
printf("\n\t\t3.用户删除");
printf("\n\t\t4.用户费用信息查看");
printf("\n\t\t5.用户缴费");
printf("\n\t\t0.退出");
printf("\n\t--请输入--: ");
while (p1 -> next != NULL)
{
if (strcmp(name,p1->next->name) == 0 && strcmp(ID,p1->next->IDcard) == 0)
{
p2 = p1 -> next;
p1 -> next = p2 -> next;
free(p2);
scanf("%s",(*p1).phone);
scanf("%d",&(*p1).build_num);
scanf("%d",&(*p1).unit_num);
scanf("%d",&(*p1).house_num);
scanf("%f",&(*p1).area);
scanf("%f",&(*p1).area_price);
scanf("%s",ad);
while (1)
{
i = 0;
j = 0;
printf("\n\t--请输入密码: ");
性;1.男性)身份证联系方式楼号单元号房号平米数每平米价格备注\n\n");
scanf("%s",(*p1).name);
scanf("%d",&(*p1).sex);
scanf("%s",(*p1).IDcard);
printf("%s",head->name);
if (head == NULL)
{
printf("没有任何数据");
Sleep(3000);
exit(1);
}
else
{
change(head);
menu_1();
}
break;
}
case 3:
{
if((fp = fopen("","rb")) == NULL)
check = login();
while (check == FAUSE)
{
printf("\n用户名或密码错误。");
Sleep(2000);
clear;
check = login();
}
clear;
menu_1();
break;
}
case 2:
{
check = login();
while (check == FAUSE)
void add_person ();
void del (PERSON *L);
void change (PERSON *L);
void sort_All (PERSON *L);
void pay (PERSON *L);
void sort_B_num (PERSON *L);
void menu_1 ();
printf("\n是否继续添加(1.是;0.否)");
scanf("%d",&n);
if (n == 0)
break;
p1 = p1 -> next;
}
p2 -> next = NULL;
save(head);
}
void del (PERSON *L)
{
PERSON *head,*p1,*p2;
PERSON *p;
char name[20],ID[19];
int k = 0;
int n;
p = (PERSON*)malloc(sizeof(struct per));
p -> next = head = L;
while (1)
{
p1 = p;
printf("请输入所要删除的用户姓名及身份证号\n-- ");
scanf("%s %s",name,ID);
break;
}
}
save(L);
}
void pay (PERSON *L)
{
char name[20],ID[19];
PERSON *head,*p;
int n,k = 0;
float money;
head = L;
while (1)
{
printf("--请输入所需缴费的用户及身份证--\n--");
k = 1;
break;
}
p1 = p1 -> next;
}
head = p -> next;
if (k == 0)
printf("\n\t--没有相关用户!--");
else
{
printf("\n\t删除用户- %s -成功!",name);
printf("\n是否继续删除(1.是;0否)");
scanf("%d",&n);
menu_2();
}
break;
}
}
}
void zhuce ()
{
FILE *fp;
char ad[50],key0[50],key1[50];
char ch;
int i,j;
printf("\t\t************用户注册*********");
printf("\n\t--请输入用户名: ");
c语言物业管理系统
#include<>
#include<>
#include<>
#ifdef __GNUC__
#include<>
#include<>
#define clear clear
#define Sleep(x) usleep(x##000)
#endif
#ifdef _MSC_VER
#include<>
相关文档
最新文档