77问答网
所有问题
当前搜索:
c语言添加密码
c语言
账号
密码
输入错误返回
答:
cin>>
mima
; for(int i=0;i<5 && flag = 0;i++){ if(a[i]==zhanghao[i]&&b[i]==mima[i]) { flag = 1; break; //下面不要
加
else了,还有return 0,return 0就函数结束了 } } }
c语言
简单编程,
密码
译成原文
答:
include <stdio.h> include <stdlib.h> include <string.h> int main(){ char es[200];int l;int n;char end;scanf("%s",es);l=strlen(es);end=es[l-1];l--;n=end-'a'+1;int direct=-1;int m;char
c
;//printf("to enterfor.");for(m=0;m<l;m++){ c=es[m];if(...
c语言
如何限定输入
密码
长度 如何限定用户选择操作只能输入数字?_百度...
答:
scanf("%[0-9]",s);//只能输入数字字符到字符串数组s,忽视其他字符
...怎样跳出循环,执行下面的内容?
c语言
大神,求解答。
答:
int input_count=1;char
password
[10]={"\0"};while(1){ scanf("%s",password); if(strcmp(password,"你的
密码
")==0) { printf("\n密码输入正确\n"); break; } else { if(input_count>3) { printf("\n密码连续3次输入错误,程序将退出"); ge...
凯撒
密码
,要求
C语言
编写,求救!
答:
写的一般般,希望对LZ有所帮助 include <stdio.h> include <string.h> int main(){ char str[201];//存放字符 char tmp[11];//临时变量 int i;//循环变量 int len;//存放消息长度 scanf("%s",tmp);//这里输入START,开始 getchar();//接收回车 while(strcmp(tmp,"ENDOFINPUT")){ g...
最新的Linux下的
c语言
怎么隐藏输入的登录
密码
,并回显为* 不要getch...
答:
在linux中getch可以做到不回显,但是用法比windos中复杂一点点,以下是简单实现,
密码
设为6位,可以按退格修改,就只写了这些功能,望采纳 include<stdio.h> include<curses.h> int main(){ int i,j=0;char ch;initscr();
c
break();noecho();curs_set(0);for(i=0;i<6+2*j;i++){ ch=...
密码
锁
c语言
编程代码
答:
include <stdio.h>#include <string.h>#include <stdlib.h>int main(){char
password
[10],password2[10];memset(password,0,sizeof(password));memset(password2,0,sizeof(password2));printf("请设置8位数以内
密码
:\n\n");scanf("%s",password);printf("请设置校验密码:\n\n");scanf("...
!跪求!
c语言
用“*”代替
密码
和密码判断的源代码。我快崩溃了。。。请...
答:
include <stdio.h> char *Input
Password
(int len) { int i=0;int Key=0;char *Password; Password=(char *)malloc(len+1);while(1) { Key=getch();/*处理回车键*/ if (Key==13) { Password[i]='\0';break;} else { /*处理BackSpace键*/ if (Key==8) { if (i>0) { ...
...3次,否则退出,如果登录成功将
密码
保存到
password
.txt中
答:
首先你的库貌似不完全还要
加上
<string.h>和<stdlib.h> 另外你说不能跳出的那个问题,可以 if(s==1){ fp=fopen("d:\\
password
.txt","w");fprintf(fp,"%s",password);fclose(fp);} 的fclose后面加个return;就可以了
c语言
里的凯撒
密码
答:
include<stdio.h>#include<string.h>int main(){int i;int number;char a[100];scanf("%s",a);number=strlen(a);for(i=0;i<number;i++){a[i]=a[i]+4;}for(i=0;i<number;i++){printf("%c",a[i]);} return 0;}
棣栭〉
<涓婁竴椤
16
17
18
19
20
21
22
24
25
涓嬩竴椤
23
其他人还搜