Untitled
unknown
plain_text
2 years ago
919 B
4
Indexable
#include<iostream> #include<string> #include<random> using namespace std; int main() { setlocale(LC_ALL, "Russian"); string a; string b; string c; string d; char r; int A, B, len; cout << "Введите слово по которому вам сгенерирует пароль:"; cin >> a; cout << "Введите количество символов в вашем пароле:"; cin >> B; cout << "Введите количество допольнительнх символов:"; cin >> len; for (int i = 0; i < a.size() * a.size(); ++i); { swap(a[rand() % a.size()], a[rand() % a.size()]); } for (int i = 0; i < len; ++i) { b += rand() % 26 + 'a'; } for (int i = 0; i <= B; ++i) { if (rand() % 2 == 1) { r = b[rand() % b.size()]; c += r; } else { r = a[rand() % a.size()]; c += r; } cout << c.size(); } }
Editor is loading...