Advertisement
Guest User

Untitled

a guest
Dec 6th, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. string szyfrowanie(string tekst, int klucz){
  6. string szyfrogram="";
  7. for(int i=0; i<tekst.length(); i++) {
  8. szyfrogram += char(tekst[i] + klucz);
  9. }
  10. return szyfrogram;
  11.  
  12.  
  13. }
  14.  
  15. int main()
  16. {
  17. string tekst ="ADBDEFGIJA";
  18. int klucz = 3;
  19.  
  20. szyfrowanie(tekst, klucz);
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement