Write a program in java to count & display the words of a given sentence that
starts & ends with a vowel.
Plz help me fast !!!!
Answers
Answered by
2
import java.util.*;
class abc
{
public static void main ( String args [ ] )
{
Scanner in= new Scanner ( System.in);
int i ,n ;
System.out.println("enter n");
n=in.nextInt();
String A[ ] = new String [n];
for (i=0;i<n:i++);
{
System.out.println("enter words");
A[i] = in.nextLine();
}
for(i=0;i<n;i++);
{
ch1= A[i].charAt (0);
ch2= A[i]>charAt(A[i]. length( )-1);
if( ch1=='A' !! ch1 == 'E' !! ch1=='I' !! ch1 == 'O' !! ch1 == 'U') && if( ch2= 'a' !! ch2= 'e' !! ch2= 'i' !! ch2= 'o' !! ch2= 'u' )
{
c++;
System.out.println( A[i]);
}
}
Similar questions