
急需一个C语言编程,要求输入密码8888,如果错误就返回继续输入,如果正确了就停止,时间很急,谢谢拉
3个回答
展开全部
#include <stdio.h>
#include <string.h>
main()
{
char *str,*psw="8888";
int L=strlen(psw);
do{
pritf("please input password;");
scanf("%s",str);
}while(strncmp(str,psw,L));
}
#include <string.h>
main()
{
char *str,*psw="8888";
int L=strlen(psw);
do{
pritf("please input password;");
scanf("%s",str);
}while(strncmp(str,psw,L));
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
main{
int a;
cin>>a;
int b[];
if(a==8888){
int x=1;
while(x)
{x=cin>>b[];
}}
else{exit();}
}
int a;
cin>>a;
int b[];
if(a==8888){
int x=1;
while(x)
{x=cin>>b[];
}}
else{exit();}
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
do until n=8888
input n
loop
#include <stdio.h>
void main()
{
int n;
do
scanf("%d,&n")
while n=8888
}
input n
loop
#include <stdio.h>
void main()
{
int n;
do
scanf("%d,&n")
while n=8888
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询