fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. string end_wynik = "",wynik;
  7. int i,przesu;
  8. system("cls");
  9. cout << "how many shift a password" << endl;
  10. cin >> przesu;
  11. cout << "your password to encode: ";
  12. while(cin >> wynik) {
  13. for (i = 0; i < wynik.length(); i++) {
  14. wynik[i] = toupper(wynik[i]);
  15. if (isupper(wynik[i])) {
  16. wynik[i] = wynik[i] + przesu;
  17. if (wynik[i] > 90) {
  18. wynik[i] = wynik[i] - 26;
  19. }
  20. }
  21. else {
  22. wynik[i] += wynik[i];
  23. }
  24.  
  25. }
  26. end_wynik += wynik + " ";
  27. }
  28. cout << endl << "your encode password: " << end_wynik << endl;
  29. system("pause");
  30. }
Success #stdin #stdout #stderr 0s 4816KB
stdin
5
11111 555 aBbA
stdout
how many shift a password
your password to encode: 
your encode password: bbbbb jjj FGGF 
stderr
sh: 1: cls: not found
sh: 1: pause: not found