main.cpp
//fn that performs encryption acccording to the rules of ceaser cipher(to know working of cipher, refer to readme)

fn that performs encryption acccording to the rules of ceaser cipher(to know working of cipher, refer to readme)
fn that performs encryption acccording to the rules of ceaser cipher ( to know working of cipher refer to readme )
void ceaser::encrypt_ceaser()
{
    cout << "Enter your message:" << endl;
    fflush(stdin);
    gets(word);
    strcpy(input_copy, word);
    cout << "Enter shift of each letter (a number) : " << endl;
    cin >> key;
    key = key % 26;
    int i, j, l;
    l = strlen(word);
    cout << "\nThe encrypted message is: ";
    for (int i = 0; word[i] != '\0'; ++i)
    {
        char ch;
        ch = word[i];
        if (ch >= 'a' && ch <= 'z')
        {
            ch = ch + key;
            if (ch > 'z')
                ch = ch - 'z' + 'a' - 1;
            word[i] = ch;
        }
        else if (ch >= 'A' && ch <= 'Z')
        {
            ch = ch + key;
            if (ch > 'Z')
            {
                ch = ch - 'Z' + 'A' - 1;
            }
            word[i] = ch;
        }
        cout << word[i];
    }
    cout << "\n\nEnter any key to know about the working of CEASER'S SHIFT: ";
    char ch;
    cin >> ch;
    display_ceaser();
}
void ceaser :: encrypt_ceaser ( ) { cout << " " << endl ; fflush ( stdin ) ; gets ( word ) ; strcpy ( input_copy , word ) ; cout << " " << endl ; cin >> key ; key = key % 26 ; int i , j , l ; l = strlen ( word ) ; cout << " \n " ; for ( int i = 0 ; word [ i ] != ' \0 ' ; ++ i ) { char ch ; ch = word [ i ] ; if ( ch >= ' ' && ch <= ' ' ) { ch = ch + key ; if ( ch > ' ' ) ch = ch - ' ' + ' ' - 1 ; word [ i ] = ch ; } else if ( ch >= ' ' && ch <= ' ' ) { ch = ch + key ; if ( ch > ' ' ) { ch = ch - ' ' + ' ' - 1 ; } word [ i ] = ch ; } cout << word [ i ] ; } cout << " \n \n " ; char ch ; cin >> ch ; display_ceaser ( ) ; }
fn that performs encryption acccording to the rules of ceaser cipher(to know working of cipher, refer to readme)
fn that performs encryption acccording to the rules of ceaser cipher ( to know working of cipher refer to readme )
//encrypt for uppercase letter
