售楼系统源代码Word格式文档下载.docx

上传人:b****2 文档编号:15095738 上传时间:2022-10-27 格式:DOCX 页数:23 大小:18.89KB
下载 相关 举报
售楼系统源代码Word格式文档下载.docx_第1页
第1页 / 共23页
售楼系统源代码Word格式文档下载.docx_第2页
第2页 / 共23页
售楼系统源代码Word格式文档下载.docx_第3页
第3页 / 共23页
售楼系统源代码Word格式文档下载.docx_第4页
第4页 / 共23页
售楼系统源代码Word格式文档下载.docx_第5页
第5页 / 共23页
点击查看更多>>
下载资源
资源描述

售楼系统源代码Word格式文档下载.docx

《售楼系统源代码Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《售楼系统源代码Word格式文档下载.docx(23页珍藏版)》请在冰豆网上搜索。

售楼系统源代码Word格式文档下载.docx

intarea;

/*面积*/

structchaoxiang_typeweizhi;

/*单元信息*/

structchaoxiang_typekind;

/*类型*/

structuser_type//用户信息结构体

{

charusername[15],

password[15];

}user;

intnumber;

intm;

//登录选择

/*读取信息模块*/

intread_file(structloupans_typeloupan[])

{FILE*fp;

inti=0;

if((fp=fopen("

loupans.txt"

"

rt"

))==NULL)

{printf("

\n库存文件不存在,请创建!

\n"

);

return0;

}

while(!

feof(fp))

{fread(&

loupan[i],sizeof(structloupans_type),1,fp);

if(loupan[i].num==0)

break;

else

i++;

fclose(fp);

returni;

}

/*保存信息模块*/

voidsave_file(structloupans_typeloupan[],intsum)

inti;

wt"

{printf("

读文件错误\n"

return;

for(i=0;

i<

sum;

i++)

if(fwrite(&

loupan[i],sizeof(structloupans_type),1,fp)!

=1)

printf("

写文件错误\n"

intprint1(void)//*登录菜单打印

printf("

\t\t**********************************************\n\n"

\t\t************欢迎登录楼盘销售管理系统!

*************\n\n"

\t\t**********************************************\n"

\t\t\t*************************\n"

\t\t\t*\t◆1注册:

\t*\n"

\t\t\t*\t\t\t*\n"

\t\t\t*\t◆2登录:

\t\t\t*\t◆3退出:

\t\t\t*************************\n\n"

\t\t\t请按序号输入你的选择:

\n\t\t\t"

scanf("

%d"

&

m);

return(m);

/*登录模块*/

//*登录程序

intlogin(void)

intflag=1,str1,str2,time=0;

inti,n=0;

charch=0;

FILE*fp;

structuser_typeuser1;

system("

cls"

\n\n\n\n"

while(flag)

switch(m)

case1:

\t\t\t★!

注册小提示:

\n\n"

\t\t\t用户名和密码不得超过15个字符!

\n\n"

fp=fopen("

f:

/password.txt"

if(fp==NULL)

\t\t\t★对不起,此文件打不开:

getch();

exit

(1);

\t\t\t★请输入你的用户名:

\n\n\t\t\t"

fflush(stdin);

gets(user1.username);

printf("

\n\t\t\t★请你输入密码:

ch=getch();

i=0;

while(ch!

='

\r'

user1.password[i]=ch;

*"

if(ch==8)

\b\b\b\b"

i--;

elsei++;

user1.password[i]='

\0'

;

fprintf(fp,"

%s\n%s\n"

user1.username,user1.password);

fclose(fp);

flag=0,n=1;

\t\t\t★注册成功!

break;

case2:

//未注册直接登录

\t\t\t对不起,此文件打不开:

fscanf(fp,"

user.username,user.password);

printf("

\t\t\t★请你输入密码:

user1.password[i]=0;

str1=strcmp(user1.username,user.username);

str2=strcmp(user1.password,user.password);

if(str1==0&

&

str2==0)

\t\t\t★成功登录!

return

(1);

}

else

\n\n\n\n\t\t\t★登录失败,请重新登录!

time++;

if(time==3)//登录次数超过三次自动退出

\n\n\n\n\t\t\t★你超过登录次数,对不起!

"

}

case3:

print1();

flag=1;

if(n)

\n\n\n\n\n"

\t\t\t你已经注册,请你登录!

//注册后登录

while(flag)

\n\n\n\t\t\t"

\n\n\n\t\t\t★请你输入密码:

for(i=0;

ch!

//判断密码是否正确

str2==0)

\t\t\t登录失败!

flag=0;

return(0);

/*输入模块*/

intinput(structloupans_typeloupan[])

inti=0;

system("

\n\t请输入要录入的楼盘的个数(最多%d个):

MAX);

number);

\n\n\t录入楼盘信息(最多录入%d个)\n"

number);

---------------------------------------\n"

while(i<

number)

\n\t\t第%d个楼盘"

i+1);

printf(“\n\n\t\t\t楼盘楼号:

(000)”);

%s"

loupan[i].num);

if(loupan[i].num==0)bre

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 人文社科 > 哲学历史

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1