Program
import java.util.*;
class RemoveVowels {
public static void main(String[] args) {
System.out.print("Please Enter the Sentence: ");
Scanner s=new Scanner(System.in);
String word= s.nextLine();
char[] c =word.toCharArray();
char[] cc= new char[80];
int j =0;
for( int i=0; i<c.length;i++){
if(c[i]== 'a' || c[i] == 'e' || c[i] =='i' || c[i] =='o'|| c[i] =='u'){
continue;
}
else{
cc[j] = c[i];
j++;
}
}
System.out.println("After Removeing Vowels from a Sencetence:");
System.out.print(cc);
}
}
Answer:
Please Enter the Sentence: Technology
After Removeing Vowels from a Sencetence:
Tchnlgy
0 Comments