Encrypting and Decrypting

PHOTO EMBED

Wed Apr 24 2024 11:34:03 GMT+0000 (Coordinated Universal Time)

Saved by @meanaspotato #c

#include<stdio.h>

int main ()
{
    char word[128];
    int i = 0;
    
    printf("Enter a word to encrypt:\n");
    scanf(" %s",word);
    
    while(word[i]!='\0')
    {
        if(word[i]=='Z')
        {
            word[i] -=26;
        }
        else if(word[i]=='z')
        {
            word[i] -=26;
        }
        word[i] ++;
        
         // Handle edge cases
        
        
        i++;
    }
    
    printf("Encrypted: %s",word);
    
return 0;
}
content_copyCOPY