#include<stdio.h>
int main()
{
char password [20] = { 0 };
int ch = 0;
int i = 0;
printf("请输入您的密码:");
scanf_s("%s", &password);
ch = getchar();
while (ch != '\n');/清空输入缓冲区/
{
;
}
printf("请输入Y/N进行确认");
i = getchar();
if (i == 'Y')
{
printf("密码确认成功/n");
}
else
{
printf("密码确认失败/n");
}
return 0;
}