#include <stdio.h>
int main()
{
int a = 0;
char password[40] = {0};
printf("输入密码=");
scanf("%s", password);
getchar();
printf("确认(Y/N:");
a = getchar();
if (a == 'Y')
{
printf("输入正确\n");
}
else
{
printf("错误\n");
}
return 0;
}
#include <stdio.h>
int main()
{
int a = 0;
char password[40] = {0};
printf("输入密码=");
scanf("%s", password);
getchar();
printf("确认(Y/N:");
a = getchar();
if (a == 'Y')
{
printf("输入正确\n");
}
else
{
printf("错误\n");
}
return 0;
}