Finding Vowel,Consonant and Other
Moderators:Labib, bristy1588
Write a program that will take a character from user and will print if it is vowel,consonant or 'other'(i.e 1,3,null). Use switch case And if-else.
r@k€€/|/
- leonardo shawon
- Posts:169
- Joined:Sat Jan 01, 2011 4:59 pm
- Location:Dhaka
Re: Finding Vowel,Consonant and Other
IN JAVA: how about using the ASCII value of all the vowels. rest are consonants. and those which are not string will be declared as others.
Ibtehaz Shawon
BRAC University.
long way to go .....
BRAC University.
long way to go .....
- Phlembac Adib Hasan
- Posts:1016
- Joined:Tue Nov 22, 2011 7:49 pm
- Location:127.0.0.1
- Contact:
Re: Finding Vowel,Consonant and Other
The same technique can be used in C/C++. But if you want something 'complex' create an array of vowels. Now compare user's input letter with these. This technique can be used in any programming language that supports variables and if...else statement. (Like C/C++, Java, JavaScript, php, Python, Ruby...)
Welcome to BdMO Online Forum. Check out Forum Guides & Rules