/* Define a class to declare an array to accept and store ten words. Display only those words which letter begin with the letter
* 'A' or 'a' and also end with the letter 'A' or 'a'.
* Example - Input: Hari, Anita, Akash, Amrita, Alina, Devi, Rishab, John, Farha, AMITHA
* Output: Anita
* Amrita
* Alina
* AMITHA
*/
import java.util.*;
class QUESTION_6
{
public static void main(String[]args)
{
Scanner sc=new Scanner(System.in);
String st[]=new String[10];
System.out.println("Enter 10 words:");
for(int i=0;i<10;i++)
{
st[i]=sc.next();
}
System.out.println("Words starting and ending with letter 'a'||'A' are :");
for(int i=0;i<10;i++)
{
char ch=st[i].charAt(0);
char ch1=st[i].charAt(st[i].length()-1);
if((ch=='a' || ch=='A') && (ch1=='a' || ch1=='A'))
System.out.println(st[i]);
}
}
}