To all Programmers
Iet's speak English language only..
Please help with my machine problem using Java..
Write a program that reads in a whole bunch of words (each word is no more than 20 characters) and spit out the duplicate words. For our purposes, words are to be separated by spaces, commas (,), !, ?, and periods (.). No word goes past the end of a line. All comparisons should ignore case.
Output: Output the sorted words, one per line, in lower case. Display same words only once.
Sample Input:
How much wood would a woodchuck chuck if a woodchuck could chuck wood? Well? What
do you think? Are you feeling well?
Sample Console:
a
are
chuck
could
do
feeling
how
if
much
think
well
what
wood
woodchuck
would
Another Problem:
The Caesar square is a transposition cipher.
The plaintext is always in groups of a perfect square such that for any number n^2, it will give you a square box that is n characters tall and n characters wide. You then write from top to bottom, initially and left to right after each column is full.
For example, the phrase:
thekinghasbeenkilledbytom
is 25 characters long.
therefore, our ciphertext looks like:
tnbibhgelyeheltkaneoiskdm
Encoding it is simple. Since we know the string is 25 characters long, we know our box must be 5x5 characters (as 5X5 = 25). We then write it in the box like so:
tnbib
hgely
ehelt
kaneo
iskdm
and we can get back our original message, if we read top to bottom.
Instruction:
Create a program that will apply this kind of cipher text. It should have two options: to encrypt plaint text to encrypted text; to decrypt encrypted text to plain text (original message). After encrypting/decrypting it will run again. The program will only terminate if it reads 0 for user input.
I hope someone will help me with this.
Thank you very much. I'm so sorry...
I was just confused about it..
But it's ok if you will not answer this question...
Again, I'm really sorry..