/* Note:Your choice is C IDE */
#include "stdio.h"
#include "string.h"
main()
{
char mm(char x,char y);
char a[20],b[20]={"abcd1234"};
printf("请输入密码:");
gets(a);
while(1)
{
if(mm(a[20],b[20])==1)
printf("登陆成功!\n");break;
if(mm(a[20],b[20])==0)
printf("密码错误!\n");
}
}
char mm(char x,char y)
{
int c;
if(strcmp(x,y)==0)
c=1;
else
c=0;
return(c);
}
没有提示错误信息,但运行时出错!帮忙看一下问题出在哪……