Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string pass("pass");
- string str;
- cout << "print pass: ";
- cin >> str;
- cout << "\n";
- bool check1 = false;
- bool check2 = false;
- bool check3 = false;
- for (int i = 0; i <= pass.length(); i++)
- {
- if (pass[i] != str[i])
- {
- cout << "incorrect" << "\n";
- break;
- }
- if (i == pass.length())
- {
- cout << "correct" << "\n";
- }
- }
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement