vigenere.c - #include <stdio.h>#include <cs50.h>#include <string.h>#include <ctype.h>#include <stdlib.h>#define Bet 26 int main(int argc string argv

vigenere.c - #include <stdio.h>#include <cs50.h>#include...

This preview shows page 1 out of 1 page.

#include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> #include <stdlib.h> #define Bet 26 int main(int argc, string argv[]) { //give an error message if they imput more than one word if (argc != 2) { printf("Make sure you type a codeword\n"); return 1; } //call our changing key codeword string codeword = argv[1]; int k=strlen(codeword); //this is to reduce recalulation of the length of our code word //now I need to see if they put in a digit and give error for(int i = 0; i < k; i++) { if (isdigit(codeword[i])) { printf("Make sure you type a codeword\n"); return 1; } } // I need to get from the user a string to encode string word =GetString(); //this checks everyletter in the code and use the codeword value
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture