I need some help writing a java program that takes in 2 characters and then encrypts the first char by moving the character x number of time to the right, x being the second character. It then returns the encrypted character.
For example:
public char encrypt(char s, char b)
{
// moves character 's' 2 spaces (because 'b' is the 2nd letter in the alphabet).
return encryptChar;
}
Any ideas on how to do this? Thanks.
For example:
public char encrypt(char s, char b)
{
// moves character 's' 2 spaces (because 'b' is the 2nd letter in the alphabet).
return encryptChar;
}
Any ideas on how to do this? Thanks.