<mosaic.cnfolio.com>
PROGRAM
  1. /*
  2. Pseudocode
  3. State the library used
  4. Define the variables used
  5. Read in the input for first line, this will measure out the Length of the cipher key.
  6. Read in the second line of user input, that will define the characters of the cipher key and the order.
  7. Count the number of characters for the cipher key.
  8. Make sure the number is between 2 to 16 characters.
  9. Compare to see if the number entered and amount of characters match
  10. If they do move onto the next part of the code.
  11. If they dont present an error and go back to reading the first line of code
  12.  
  13. Read in third line of user input, this is the length of the plain text
  14. Read in the fourth line of user input this will be the plain text to be encrypted
  15. Count the amount of characters used in the plain text.
  16. Make sure the amount of characters is between 4 and 256
  17. Compare the number entered to the number of characters
  18. If the numbers match move onto the next part of the code
  19. If the numbers dont match move back to reading the third line of user input
  20.  
  21. Loop this till the cipher key length is matched
  22. Read the character of the loop number
  23. Swap this character from plain text with the next corresponding character on the right
  24. Last number will swap the character with teh first character of the cipher key
  25. Has the cipher key Length number matched to the loop number
  26. If yes move on
  27. If it didnt go back to the loop
  28.  
  29. Present the encrypted message to the user
  30. End Program
  31.  
  32. */
  33. #include <stdio.h>
  34.  int main ( void )
  35.  {
  36.    int cipherkeyLength = 0;
  37.    int plaintextLength = 0;
  38.    int LoopNumber = 0;
  39.    char cipherLength;
  40.    char plaintext;
  41.    
  42.    Scanf ("%d", &cipherkeylength);
  43.    Scanf ("%d", &cipherLength);
  44.    
  45.    LoopNumber = CipherKeyLength;
  46.    
  47.    Do{
  48.    
  49.    
  50.    }While ("CipherKeyLength == LoopNumber")
  51.    
  52.    
  53.    
  54.    Scanf ("%d", &plaintextLength);
  55.    Scanf ("%d", &plaintext);
  56.    
  57.    
  58.    
  59.    Printf ("%d", &plaintext);
  60.  }