If you have the code to store the String's characters into an array row by row,
now work on the code to take out the characters from the array column by column.
Use a StringBuilder to save the...
Type: Posts; User: Norm
If you have the code to store the String's characters into an array row by row,
now work on the code to take out the characters from the array column by column.
Use a StringBuilder to save the...
Work on one method at a time.
In the encrypt method, work on putting the input into the array. When that step works, then move to the next step.
Use this statement for printing out the contents...
What problems are you having?
Is there some confusion on what the program is supposed to do?
For the encrypt part: What does the program read in, what does it do with what was read and what does it write out?
For the decrypt...
Is this the same problem: http://www.javaprogrammingforums.com/java-theory-questions/27258-encrypting-decrypting-string.html#post107540
The Threads have been merged
Why change the array? Why not change how the elements are read from the array?
I don't see how reading the array by rows or reading it by columns is doing any shifting of its contents. The positions of the letters in the array doesn't change.
Can you give an example of "shifting"?
Is that the square root of the minimum square number? The Math class has some methods that could help find that.