How to reuse(loop) key in vigenere cipherkey cs50 pset2
问题 I was making a program for Vigenere cipher. I made the program print the cipher text successfully. But, I can't loop the key. so if my key was 'abc' and my plain text was hello, it should print 'hfnlp' not 'hfn'. #include <stdio.h> #include <cs50.h> #include <string.h> #include <ctype.h> int main(int argc, string argv[]) { if(argc != 2) { printf("\aError\n"); return 1; } else { string a = argv[1]; // converts argv[1] printf("plaintext: "); string b = get_string(); // takes the plaintext