1.#include<stdio.h>
2.int main()
3.{
4. int a,b,c;
5. char s[20];
6. printf("请输入密码的值\n");
7. scanf("%s",s);
8. while(getchar()!='\n')
9. {
10. ;
11. }
12.
13. printf("确认密码Y/N\n");
14. a=getchar();
15. if(a=='Y'||a=='y')
16. {
17. if(s==1234)
18. {
19. printf("密码正确\n");
20. }
21. else
22. {
23. printf("密码错误\n");
24. }
25. }
26. else{
27. printf("密码错误");
02-12
817
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-10
688
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交