Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Example program
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- bool enc = 0; //change this to encript or decript
- string user;
- //cout<< msg[0];
- int a;
- char b;
- getline(cin, user);
- if (enc){
- for(int i=0; i<user.length(); i++)
- {
- // cout<<msg[i];
- a = user[i];
- a=(a +1);
- //cout << a;
- b = a;
- cout << b;// << " ";
- }
- cout << "\n ";
- }else{
- for(int i=0; i<user.length(); i++)
- {
- // cout<<msg[i];
- a = user[i];
- a=(a -1);
- //cout << a;
- b = a;
- cout << b;// << " ";
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement