/* This program encodes/decodes multiple messages of up to 1024
   characters using the Caesar cipher.

   Input:  A sequence of characters, stored in S
           An integer, stored in k
   Output: The sequence of characters that are k positions away
           from the input characters in the ASCII ordering
-----------------------------------------------------------------*/

#include <iostream.h>

#include "Ciphers.h"     // contains declaration of CaesarCipher()
#include "Query.h"       // contains declaration of NotDone()
#include "Strings.h"     // class Strings

int main(void)
{
   cout << "\nThis program encodes/decodes a line of text,\n"
        << "\t using the Caesar cipher.\n";

   Strings
      S;
   int
      k;

   do
   {
      cout << "\nPlease enter your string: ";
      S.GetLine(cin);                        // get the whole line

      cout << "Offset (an integer)? ";       // get the offset
      cin >> k;

      CaesarCipher(S, k);

      cout << "\n--> Your message is: " << S << "\n\n";

   }
   while (NotDone());

   return 0;
}

