| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 409 人关注过本帖
标题:[原创]欢迎提出新方法
只看楼主 加入收藏
wenyong
Rank: 1
等 级:新手上路
帖 子:251
专家分:0
注 册:2005-8-9
收藏
 问题点数:0 回复次数:0 
[原创]欢迎提出新方法

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <string.h>
#define MAX 10
char a[MAX]="";
getpassword()
{
char c;

int count=0;

while((c=getch())!='\r')
if(c=='\b')
{
printf("\b \b");
count--;
}
else
{
a[count++]=c;
putchar('*');
}
putchar('\n');
return 0;
}

main()
{
char b[]="123";
getpassword();
if(strcmp(a,b)==0)
printf("ok");
else
printf("sorry");
getch();
}

欢迎提出新的好建议!

搜索更多相关主题的帖子: 欢迎 
2005-12-14 17:37
快速回复:[原创]欢迎提出新方法
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.021794 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved