#include<stdio.h>标签:ch,int,密码,改进,设置,printf,password,getchar From: https://blog.51cto.com/u_15926835/5983767
int main()
{
int i = 0;
int ch = 0;
char password[20] = {0};
printf("请输入密码:");
scanf("%s", password);
while ((ch = getchar()) != '\n')
{
;
}
printf("请确认(Y/N):");
i = getchar();
if (i =='Y')
printf("密码确定成功");
else
printf("密码确认失败");
return 0;
}