Created
December 22, 2015 01:59
-
-
Save peter279k/ef4558b81b1eba2f298e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.*; | |
public class main{ | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
while(input.hasNext()) { | |
String str = input.nextLine(); | |
str = str.toLowerCase(); | |
String result = ""; | |
String str2 = "`1234567890-=qwertyuiop[]\\asdfghjkl;'zxcvbnm,./"; | |
for(int i=0;i<str.length();i++) { | |
if(str.charAt(i) == ' ') { | |
result += " "; | |
continue; | |
} | |
for(int j=0;j<str2.length();j++) { | |
if(str.charAt(i) == str2.charAt(j)) { | |
result += str2.charAt(j-2); | |
} | |
} | |
} | |
System.out.println(result); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment