Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <fstream>
- #include <sstream>
- #include <string>
- using namespace std;
- string szyfruj(string napis, int klucz)
- { int kod; string szyfr="";
- for(int i=0;i<napis.length();i++)
- {
- kod=int(napis[i]);
- kod=kod+klucz;
- while(kod<32||kod>127)
- {
- if(kod>127) kod=kod-96;
- if(kod<32) kod=kod+96;
- }
- szyfr=szyfr+char(kod);
- }
- return szyfr;
- }
- int main()
- {
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement