#include #include #include #include #include int main (int argc, string argv[]){ // testing if user has put correct number of arguments in command-line if (argc != 2){ return 1; } // transforming the string containing the key into an actual integer int k = atoi(argv[1]); //getting the plain text from the user string plaintext = GetString(); //declaring the string that will contain the cypher text string cipher[strlen(plaintext)]; int letter; for (int i=0, j= strlen(plaintext); i90){ letter= 65+ letter-91; } } if (islower(plaintext[i])){ // checking if wrap round from z to a is needed if (letter>122){ letter= 97+ letter-123; } } cipher[i]= (string) letter; printf("%c", (char) cipher[i]); } else{ printf("%c", (plaintext[i])); } } printf("\n"); return 0; }