fork(3) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static String AddThreeCodes(String inputstring) {
  11. int i,j;
  12. char c;
  13. String outputstring="";
  14. for(i=0;i<inputstring.length();i++){
  15. c=inputstring.charAt(i);
  16. j=(int)c;
  17. j=j+3;
  18. c=(char)j;
  19. outputstring=outputstring+String.valueOf(c);
  20. }
  21. System.out.println(outputstring);
  22. return outputstring;
  23. }
  24. public static void main (String[] args) throws java.lang.Exception
  25. {
  26. // your code goes here
  27. AddThreeCodes("PTTISGOOD");
  28. }
  29. }
Success #stdin #stdout 0.07s 380224KB
stdin
Standard input is empty
stdout
SWWLVJRRG