Question: I had code like that: class Vigenere { public : string key; Vigenere(string key) { for ( int i = 0; i < key.size(); ++i)

I had code like that:

class Vigenere { public: string key; Vigenere(string key) { for (int i = 0; i < key.size(); ++i) { if (key[i] >= 'A' && key[i] <= 'Z') this->key += key[i]; else if (key[i] >= 'a' && key[i] <= 'z') this->key += key[i] + 'A' - 'a'; } } 

And inside the main()

I had:

Vigenere cipher("KEY");

Have can I change the code that asked user to input the key instead of type the "key" in the program?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!