java

Write a program to input a String and Convert it in UPPER CASE and replace all vovel of String with the charactor followed by vovel. #JAVA

Write a program to input a String and Convert it in UPPER CASE and replace all vovel of String with the charactor followed by vovel. #JAVA

java

/*
QUESTION : Write a program to take input of a String, Convert it in UPPER CASE and replace all vovel of String with
           the charactor followed by vovel.
        Example :
                INPUT STRING : Computer
                OUTPUT STRING : CPMPVTFR
*/


checkout Stone Paper Scissor Game code :Β click here

checkout Stone Paper Scissor Game code :Β click here

 

package com.company;

import java.util.Locale;
import java.util.Scanner;

public class shivam_program_1
{
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("Input a String : ");
        String str = sc.nextLine();
        System.out.println("Input String is :" + str );
        str = str.toUpperCase();
        int i,l,temp;
        l = str.length();
        String newstr = "";
        char ch;
        for ( i = 0 ; i < l ; i++ )
        {
            ch = str.charAt(i);
            if( ch=='A' || ch=='E' || ch=='I' || ch=='O' || ch=='U' )
            {
                temp = (int)ch + 1;
                ch = (char)temp;
            }
            newstr = newstr + ch;

        }
        System.out.println("New String : " + newstr);

    }

}


Thanks Dosto for Reading this blog.

I think you all are definitely thinking of being connected with me.

Are you??
Yaa I know no-one is here but then also I provide my all social media links of my Digital Creation Tech DCode and my personal handles.
πŸ§‘β€πŸ’»πŸ§‘β€πŸ’» Social Media Links of Tech DCode :

πŸ‘‰πŸ»Β InstagramΒ :Β https://www.instagram.com/thetechdcode/
πŸ‘‰πŸ»Β Facebook PageΒ :Β https://www.facebook.com/thetechdcode
πŸ‘‰πŸ»Β TwitterΒ :Β https://twitter.com/thetechdcode
πŸ‘‰πŸ»Β TelegramΒ ChannelΒ :Β https://t.me/thetechdcode
πŸ‘‰πŸ»Β YouTubeΒ :Β https://www.youtube.com/channel/UCjJnEdeugftBwQ3yMuD4B_A
πŸ‘‰πŸ»Β Tech DCode LinktreeΒ :Β https://linktr.ee/thetechdcode
πŸ‘‰πŸ»Β My Personal HandlesΒ :Β https://linktr.ee/virtualshivamin

 

πŸ§‘β€πŸ’»πŸ§‘β€πŸ’»Β Social Media Links of SHIVAM SINGH (OWNER) :
πŸ‘‰πŸ»Β InstagramΒ :Β https://www.instagram.com/virtualshivamin/
πŸ‘‰πŸ»Β Facebook PageΒ :Β https://www.facebook.com/virtualshivamin/
πŸ‘‰πŸ»Β TwitterΒ :Β https://twitter.com/virtualshivamin/
πŸ‘‰πŸ»Β Personal LinktreeΒ :Β https://linktr.ee/virtualshivamin

 

Leave a Reply

Your email address will not be published. Required fields are marked *