Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string input = "";
- char[] vovels = {'a','o','e','u','i'};
- char[] alphabet = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
- char matched_character = input.toCharArray()[0];
- if(alphabet.contains(matched_character)){
- if(vovels.contains(matched_character)
- Console.Write(input + "is a vovel");
- else
- Console.Write(input + "is a consonant");
- }
- else
- Console.Write(input + "is not a character");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement