Computer Science, asked by akashrakshit9419, 5 months ago

create an array with 10 alphabet s and print only the consonants in java​

Answers

Answered by avanthi1611
1

Answer:

import java.util.*;

class consonants

{

public statis void main(String args[ ])

int n, m=10;

int i, j;

char a[ ] = new char[n] ;

System.out.println("Enter 10 alphabets") ;

for (i=0;i<n;i++)

{

a[ ] =sc.nextInt ( ) ;

}

for (j=0;j<m;j++)

{

if ( a[j] == 'a' | | a[j] == 'e' | | a[j] == 'i'

| | a[j] == 'o' || a[j] == 'u')

continue ;

else

System.out.println(a[j]

}

}

This took soo long to type...

This took soo long to type... Please mark me as brainliest

Similar questions