Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
Node is saved as draft in My Content >> Draft
  • How to make PIGLATIN Word ?

    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 312
    Comment on it

    Piglatin : Piglatin is a way of forming a word by  finding the vowel and trace the alphabhet to the end and adding the "ay" at the End. For example: if the input word is "DEMO" then piglatin word will be "EMODAY". Program below illustrate how to Convert it.

        public class PigLatin {
    
        public static void main(String[] args)
        {
            System.out.println("Enter word: ");
            Scanner scanner = new Scanner(System.in);
    
            String FirstVowel = scan.nextLine();
            char v = Character.toLowerCase(FirstVowel.charAt(0));
    
            if (v == 'a' || v == 'e' || v == 'i' || v == 'o' || v == 'u')
            {
                String PigLatin = FirstVowel + "ay";
                System.out.println(PigLatin);
            }
            else
            {
                String first =FirstVowel.substring(0,1);
                String term =FirstVowel.substring(1,FirstVowel.length());
                System.out.println(term + first + "ay");
            }
        }
    }

     

    Java piglatin

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: