Advertisement
Guest User

Untitled

a guest
Jan 26th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. #include<stdio.h>
  2. #include<ctype.h>
  3.  
  4. char *encrypt(char *input);
  5.  
  6. int main()
  7. {
  8.     char *instructions= "Deliver the package to Brooklyn";
  9.     printf("Here are your secret instructions:\n%s\n",encrypt(instructions));
  10.    
  11.     return(0);
  12. }
  13.  
  14. char *encrypt(char *input)
  15. {
  16.    
  17.     char output[122];
  18.     int x=0;
  19.     while(*input)
  20.     {
  21.         if(isalpha(*input))
  22.             output[x]= *input+1;
  23.         else
  24.             output[x]=*input;
  25.         input++;
  26.         x++;
  27.     }
  28.     return putout;
  29.    
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement