encryp program

i already did a program that encrypts letters by skipping 1 or 2. but now i need to make a program that encrypts a word, using substitution. I already try several things but i can't get it work. can anybody help me?

for example the normal key is a,b,c,d,e
and the secret key is f,g,h,i,j.

the program prompts the user to enter a word using the letters in the secret key. and then outputs the word using the normal key.

i already did a program that encrypts letters by skipping 1 or 2. but now i need to make a program that encrypts a word, using substitution. I already try several things but i can't get it work. can anybody help me?

for example the normal key is a,b,c,d,e
and the secret key is f,g,h,i,j.

the program prompts the user to enter a word using the letters in the secret key. and then outputs the word using the normal key.