c语言编程函数坐标式,vc++ 6.0 里面有没有坐标函数哦

那我写一个完整的吧:

#include

#include

#include

#include

#include

#define NULL 0

#define PASSWORD "521314" //系统登陆密码

/************************密码验证*****************************/

void password()

{

char *pass=NULL; //初始化指针

int count;

time_t start,end; //时间函数

pass=(char *)malloc(255*sizeof(char)); //分配内存

while(1)

{

count=0;

printf("\n\n\n\n\n\t\t 学生信息管理系统Ver1.0测试版 \n");

printf("\n\t\t 用户名:TIANYA \n");

printf("\n\t\t 密 码:");

while((count>=0)&&(pass[count++]=getch())!=13) //密码输入

{

if(pass[0]=='\b')

{

count=0;

continue;

}

else if(pass[count-1]=='\b')

{

printf("%c%c%c",'\b','\0','\b');

count-=2;

}

else

putchar('*');

}

pass[--count]='\0';

if(!strcmp(pass,PASSWORD)) //开始验证

{

system("cls");

printf("\n\n\n\n\n\n\n\n\n\t\t\t");

printf(" 欢 迎 登 陆 学 生 信 息 管 理 系 统 !");

start=time(NULL);

end=time(NULL);

while(end-start<1) //延时1秒执行以下程序

{

end=time(NULL);

}

system("cls");

free(pass); //释放储存密码的内存

return ;

}

free(pass); //释放密码错误的那块内存

pass=(char *)malloc(255*sizeof(char)); //重新分配储存密码内存

system("cls");

printf("\a\n\n\n\n\n\n\n\n\t\t\t\t密 码 错 误 !");

getch();

system("cls");

}

}

int main()

{

password();

getch();

return 0;

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值