Computer Science, asked by mayawati, 1 year ago

Write a program in Java to accept a sentence and display the new string after removing all the vowels present in it
Sample Input: COMPUTER APPLICATIONS
Sample Output: CMPTR PPLCTNS
pls guys i hv my exam plsssssssssssssssssssssss

Answers

Answered by Alex11
2
import java.util.*;
class Sample {
public static void main() {
String s,str,s1;
System.out.println(" Enter the string. ");
Scanner sc=new Scanner(System.in);
s=s.trim(sc.next line());
str=s.toLowerCase();
int i,l;
char c;
l=str.length();
for(i=0;ic=str.charAt(i);
if(c=='a' || c=='e' || c=='i' || c=='o' || c=='u'){continue;}
else{ s1+=s.charAt(i);}}
System.out.println(" Output : "+s1);
}}



Alex11: replace the for statement with : for(i=0;i
Answered by pkumardiary
0

Answer:s=input('enter the string')

st=''

for i in range(0,len(s)):

if s[i] in 'aeiou' or s[i] in 'AEIOU':

continue

else:

st=st+s[i]

print(st)

Explanation:this is python

Similar questions