SHARE
TWEET

Untitled

a guest Jan 21st, 2020 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.*;
  2. import java.util.Scanner;
  3.  
  4. class PigLatin {
  5.     public static void main(String arg[]) {
  6.         Scanner sc = new Scanner(System.in);
  7.         while (sc.hasNext()) {
  8.             StringBuilder sb = new StringBuilder(sc.next());
  9.             char copy = sb.charAt(0);
  10.             sb.deleteCharAt(0);
  11.             System.out.print(sb.append(copy) + "ay ");
  12.         }
  13.  
  14.     }
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top