English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

Write a program called Decrypt, that reads a sentence from the standard input, keyboard input. The sentence has been encrypted as follows: only the first five even-numbered characters should be counted. Decrypt the sentence and output the result.
Sample Input:
Pleas enter encrypted string:
Hiejlzl3ow

Sample Output:
The decrypted string is: Hello

2007-03-17 18:11:39 · 2 answers · asked by LULU 1 in Computers & Internet Programming & Design

2 answers

How many times will you ask this same question? Just try to do it and post your code with your doubts so every one here can help you.

2007-03-18 14:36:13 · answer #1 · answered by Anonymous · 0 0

BufferedReader input = new BufferedReader( new InputStreamReader( System.in ));

System.out.println("Please enter encrypted string: ");
String cipher = input.readLine();

String plain = "";
for(int i=0; i { plain = plain + cipher.charAt(i); }

System.out.println( "\nThe Message is: " + plain);

2007-03-19 05:37:25 · answer #2 · answered by Liviawarty J 2 · 0 0

fedest.com, questions and answers