Recently i have been playing around with caeser cipher and i came up with this:

Code:
    string a = "thisisit";
    string ciphertext;
    int b = a.length();
    int offset = 3;
    int offset2 = 5;
    int offset3 = 2;
    for (int i = 0; i < b; ++i)
    {
        ciphertext += ( ( (a[i] - 'a') + (offset - offset2) / (offset3 * offset) - offset2) %26) + 'a';
    }
    cout<< ciphertext <<endl;
    cin.get();
And it works to encrypt the data but how do i decrypt it after that? I was thinking maybe something along the lines of reversing this part of the code:

[code]
ciphertext += ( ( (a[i] - 'a') + (offset - offset2) / (offset3 * offset) - offset2) %26) + 'a';
[code]

P.S i am quite a newb and have never done anything like this before so be gentile(lol).