Guest User

Untitled

a guest
Sep 20th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.io.BufferedReader;
  2. import java.io.IOException;
  3. import java.io.InputStreamReader;
  4.  
  5. public class JavaTest {
  6.  
  7. public static void main(String[] args) {
  8. BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
  9. System.out.println("Copy and paste the values coding level 2 and press enter:");
  10.     String area = "";
  11.         try {
  12.         area = br.readLine();
  13.         } catch (IOException e) {
  14.         e.printStackTrace();
  15.         }
  16.        
  17.     String[] strList = area.split(",");
  18. StringBuffer result = new StringBuffer();
  19.         for (int i = 0; i < strList.length; i++) {
  20.         char c = ' ';
  21.         if (!" ".equals(strList[i])) {
  22.         int ord = Integer.parseInt(strList[i]);
  23.        
  24.         c = (char)(94 - ord + 32 + 32);
  25.         }
  26.         result.append(c);
  27.  }
  28.  
  29.  System.out.println(result);
  30.  }
  31.  
  32. }
Add Comment
Please, Sign In to add comment