create an array with 10 alphabet s and print only the consonants in java
Answers
Answered by
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
Science,
2 months ago
Music,
5 months ago
English,
10 months ago
Math,
10 months ago
Social Sciences,
10 months ago