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
/* 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.
ππ»Β 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