Skip to content

Instantly share code, notes, and snippets.

@TheFatCat06

TheFatCat06/Q3S2 Secret

Created April 14, 2022 19:02
import java.util.*;
class Q32S{
public static void main(String args[]){
Scanner s=new Scanner(System.in);
char ch[]=new char[10];
int upper=0,vowel=0;
char c=' ';
System.out.println("Enter characters: ");
for(int i=0;i<ch.length-1;i++){
ch[i]=s.next().charAt(0);
if(Character.isUpperCase(ch[i]))
upper=upper+1;
c=ch[i];
if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U')
vowel=vowel+1;
}
System.out.println("No. of UPPERCASE : "+upper);
System.out.println("No. of vowels : "+vowel);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment