All pastes #75202 Raw Edit

Something

public cpp v1 · immutable
#75202 ·published 2006-06-29 22:18 UTC
rendered paste body
#include <iostream>#include <string>using namespace std;int main (int argc, char** argv) {    int x = 13;    string text;    char a;    if (argc >= 2) x = atoi(argv[1]);    if (!(x >=0 && x < 26)) exit(1);    getline(cin, text);    for (int i = text.length() - 1; i >=0; i--) {        a = text[i];        if (0x41 <= (a & ~0x20) && (a & ~0x20) <= 0x5A)            a = ((a & ~0xE0) + x - 1) % 26 + 1 + (a & 0xE0);        text[i] = a;    }    cout << text;    return 0;}