Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- void main()
- {
- int count=0;
- string s1 = "837AC6";
- string s2;
- while (count<3)
- {
- cout << "請輸入密碼" << endl;
- cin >> s2;
- if (s1.compare(s2) != 0)
- {
- cout << "請重新輸入密碼" << endl;
- count++;
- }
- else
- {
- cout << "密碼正確" << endl;
- break;
- }
- }
- if (count == 3)
- cout << "忘記密碼??????" << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement