right on!! Thanks man. Thanks to your tips I was able to get it going. Not only that, but it made me realize that my former algorithm was not quite right. Like on the "w" is pointing to "}". It should point to "a".
I modified the "formula", the shift algorithm. I noticed that former formula was not quite right.
by the way...How do I leave spaces in the encrypted sentences instead of putting a character?
anyway...let me show you the NEW for-loop and NEW formula.
Code:
for (int iteration = 0; iteration < plainText.length(); iteration++)
{
character = plainText.charAt(iteration); //get characters
character = (char) ('a' + (character - 'a' + MOVE_DOWN) % 26); //perform shift. New formula.
System.out.print(character);
}
System.out.println();
}//closes void main
} //closes class
Now, How do I leave spaces in the encrypted sentences instead of putting a character?
Right now if you input a string like "angels team" , the space gets printed out as an X. A big "x".
It says "erkipwXxieq"
erkip=angel team=xieq space=X
it should say simply "erkip xieq"
How can I keep the spaces?
thanks bro.