<mosaic.cnfolio.com>
PROGRAM
  1. /* Psudo Code:
  2. START
  3.  
  4.    Display 'Input No. of characters between 2 and 16 for the cypher'
  5.    Recieve input characters for cypher   
  6.  
  7.   IF the length of the key is less than 2
  8.     THEN
  9.         Display Error Message : 'Add a higher value'
  10.   IF the length of the key is more than 16
  11.     THEN
  12.         Display 'Decrease value'
  13. END IF
  14.  
  15.    Display 'Input cypher characters'
  16.    Recieve Input cypher characters
  17.  
  18.   IF character is not between a-z
  19.     THEN
  20.         Display Error Message : 'Character must be between characters a and z'
  21.   IF characters are put down more than once
  22.     THEN
  23.         Display Error Message 'Only input one of each character'
  24. END IF
  25.  
  26.    Display 'Input text size number between 4 to 256'
  27.    Recieve Input characater size
  28.  
  29.   IF character size number recieved is less than 4
  30.     THEN
  31.         Display Error Message : 'Character limit too small. Input a higher limit number.'
  32.   IF character number size is more than 256
  33.     THEN
  34.         Display Error Message 'Character limit too big. Input a lower limit numbers.'
  35. END IF
  36.  
  37.    Display 'Input Plain Text Message'
  38.    Recieve Input Plain Text
  39.  
  40.   IF character is not between a-z
  41.     THEN
  42.         Display Error Message : 'Character must be between characters a and z'
  43.   IF characters are put down more than once
  44.     THEN
  45.         Display Error Message 'Only input one of each character'
  46.  
  47.   IF text size is less than input size recieved
  48.     THEN
  49.         Display Error Message : 'Text size too small. Input a text with more characters.'
  50.   IF text size is more than the input size recieved
  51.     THEN
  52.         Display Error Message 'Character limit too big. Input less characters.'
  53. END IF
  54.  
  55.     The first letter from the cypher will be identified in the text
  56.     Replace all of that letter withb the next letter in the cyfer
  57.  
  58.   IF this is completed
  59.      THEN
  60.          Move to the next letter
  61.            Repeat
  62. END IF
  63.  
  64.     Continue till the first letter is returned to
  65.  
  66. END
  67. */
  68.  
  69.    #include <stdio.h>
  70.    #include <string.h>
  71.    
  72. int  cypher = 0;
  73. int  cypherlength = 0;
  74. int  text = 0;
  75. int  textlength = 0;
  76.  
  77.    
  78.    int main ( )
  79.  
  80. {
  81.    printf ( 'Input No. of characters between 2 and 16 for the cypher' );
  82.    
  83.    
  84.     scanf( "%d", &cypherlength );
  85.    
  86.     if( cypherlength < 2){
  87.     printf( 'Add a higher value' );
  88.     }
  89.    
  90.     if( textlength > 16){
  91.     printf( 'Decrease value' );
  92.     }
  93.  
  94.  printf (  "Input text to encrypt" );
  95.  
  96.     scanf( "%d", &textlength );
  97.    
  98.     if (textlength > 4){
  99.     printf( 'Add a higher value' );
  100.     }
  101.    
  102.     if( textlength < 256){
  103.     printf( ' Decrease value' );
  104.     }
  105.    
  106.    
  107.     scanf( "%c", &cypher );
  108.    
  109.    
  110.    
  111. }
  112.  
  113.  
  114.  
  115.  
  116. /*
  117. {
  118.    printf (  "Input No. of characters between 2 and 16 for the cypher" );
  119.      
  120.  
  121. }*/