answersLogoWhite

0


Best Answer

in semi-pseudo code:

get character

//convert uppercase letter to lowercase letter

if( 65 <= (int) character <= 90)

character ^ 32

//check that a letter was given

if( 97 <= (int) character <= 122)

{

switch(character)

{

case a:

case e:

case i:

case o:

case u:

output "vowel"

break;

case y:

output "consonant and/or vowel"

break;

default:

output "consonant"

break;

}

}

else

output "not a letter"

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

14y ago

Function isVowel(ByVal ch As Char) As Boolean

Select Case ch

Case "a"

Return True

Case "e"

Return True

Case "i"

Return True

Case "o"

Return True

Case "u"

Return True

End Select

Return False

End Function

int isVowel(const char ch) {

switch(ch) {

case 'a':

case 'e':

case 'i':

case 'o':

case 'u':

return 1;

}

return 0;

}

static bool isVowel(char ch) {

switch(ch) {

case 'a':

case 'e':

case 'i':

case 'o':

case 'u':

return true;

}

return false;

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How net write a program to identify whether a character entered by a user is a vowel or constant?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program to enter a character and it will tell the character etered?

{char a;...cout > a;cout


How do you write a c program to read two character from keyboard nd sot them in alphabetical order?

Every character in C++ is basically belongs to short. You can convert entered characters to short, compare their values and according to the values sort them in alphabetical order.


What is an aggregate constant?

An aggregate constant is a nonscalar constant which value never change or are not changed during execution of the program.


The Social Security program is very secure and continues to grow at a constant rate.?

No, the social security program is not secure and it does not continue to grow at a constant rate.


Is there a website with an online program that will identify parts of speech from an entered sentence?

Google "Parts of Speech Level A 2.1.5". This software labels parts of speech like you are looking for. There is a demo as well as well as full software online for which you will have to pay.


Is it true the Social Security program is very secure and continues to grow at a constant rate?

No, the social security program is not secure and it does not continue to grow at a constant rate.


Difference Between Variable And constant?

A constant and variable are variations of data types. int a; is a variable and its value can be changed by the program as the program runs. const int b; is a constant with a fixed value and will have its value set and may not be changed by the program as as the program runs. All data types may be declared as a constant. Variable Value Can Be Changed By You In Programme.


What is the output displayed by the following program when the data entered are 5 and 7?

Impossible to say without seeing the program's source.


How do write a program to check vowel or constant in visual basic?

Hi Friends I have posted a small program for checking vowels in console in vb.netIf there is any corrections please let me know...........Module Module1Dim a As CharSub Main()Console.WriteLine("Enter Alphabets")a = Console.ReadLine()If a = "a" Or a = "e" Or a = "i" Or a = "o" Or a = "u" Or a = "A" Or a = "E" Or a = "I" Or a = "O" Or a = "U" ThenConsole.WriteLine("Entered Leter Is Vowel")ElseConsole.WriteLine("Entered Letter is Not Vowel")End IfEnd SubEnd Moduleby,S . Jai Gannesh(AJ)


What show does Teto and Miku come from?

The character Teto comes from the program known as UTAU. The character Miku comes from the program known as Vocaloid.


What is constant variables?

Variables are items, which change their values during the execution of a program. Constants do not change the value during the execution of a program.


Write a program to adentify whether a character entered by a user is a vowel or a consonant?

You can check the value of a character by using if statements.Also, note that this code does not check for capital letters./* code */#include int main(){char c;c = getc(stdin);if (c 'o') {/* If the character is a vowel, this code will be executed. */} else if (c >= 'a' && c