pset2/vigenere/vigenere.c
char enc(char c, char k)
{
    // shift sets the distance to zero for the upper and the lower case letters
    char shift = 65;
    if (islower(c))
    {
        shift = 97;
    }
    
    // convert 'a' and 'A' to 0, 'b' and 'B' to 2 and so on
    k = toupper(k) - 65;
    
    // calculate and return result
    return ( ((c - shift + k) % 26) + shift  );
}
// this function encrypts single character c with a key k
this function encrypts single character c with a key k
this function encrypts single character c with a key k
char enc(char c, char k)
{
    char shift = 65;
    if (islower(c))
    {
        shift = 97;
    }
    k = toupper(k) - 65;
    return ( ((c - shift + k) % 26) + shift  );
}
char enc ( char c , char k ) { char shift = 65 ; if ( islower ( c ) ) { shift = 97 ; } k = toupper ( k ) - 65 ; return ( ( ( c - shift + k ) % 26 ) + shift ) ; }
this function encrypts single character c with a key k
this function encrypts single character c with a key k
// shift sets the distance to zero for the upper and the lower case letters // convert 'a' and 'A' to 0, 'b' and 'B' to 2 and so on // calculate and return result