two dimensional arrays help
Simple Encryption and decryption
Question is
The user will enter a word (a maximum of 20 characters or until the user presses Enter) and your program should encrypt or decrypt the word based on the users choice. The idea is to find the correct letter and pring the corresponding one.
The code I did is
insert
Code:
#include <stdio.h>
int main()
{
char original[27]{'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',' '};
char encrypted[27]{'H','F','L','R','U','O','P','C','B','A','Z','E','W','D','G','Y','I','M','K','N','X','S','J','V','Q',' ','V'};
char word[20];
char processed[20];
int i,j;
printf("Please enter the word: \n");
for(i=0; i<20; i++){
scanf("%c", &word[i]);
if(word[i] == '\n')
}
for(i=0; i<20; i++)
for(j=0; j<27; j++){
if(word[i] == original[j]);
}
I couldnt continue :(
Thank you so much for your time