编写密码设置函数SetPassword(),实现密码设置,让用户...
编写密码设置函数SetPassword(),实现密码设置,让用户输入一个8位密码,如果长度不符合要求则重新输入,如果长度合法,要求再次输入这个8位密码来进行验证,如果第二次输入的密码与第一次输入的密码不一致,则重新进行密码设置。编写主函数调用密码设置函数,设置密码并将用户设置的密码显示给用户。 函数原型: void SetPassword(char *ps); 功能:密码设置 参数:char *ps ,保存用户设置的密码串信息 第一次输入提示信息:”Please input password:” 密码长度不合法时的输出提示信息:”The length of the password must be 8, input again.\n” 再次输入提示信息:”Please input password again:” 两次输入不一致的提示信息:”Twice input is inconsistent, set again.\n” 程序运行示例: Please input password:zyh1234567↙ The length of the password must be 8, input again. Please input password:zyh123↙ The length of the password must be 8, input again. Please input password:zyh12345↙ Please input password again:abcd123↙ Twice input is inconsistent, set again. Please input password:zyh12345↙ Please input password again:zyh12345↙ Please remember your password:zyh12345