If you are looking for a program for checking entered character is a vowel or not then here is something easy for you. These types of questions are rarely asked in exams but these types of programs are valuable for increasing our programming skills and also helpful for improving our coding skills. I hope you are familiar with this question because in the last post we already discuss this topic. If you have not read that article then you can see that post here, how to check character is a vowel or consonant in vb dot net.
We have already known about which is vowel characters and which is consonant characters but here machine have don’t know about these characters, so we want to create a program by using some logic due to that machine also understands, and after that, we can get the output as we want. So without wasting time let’s start the program.
Steps for creating a program that will check character is a vowel character or not
- First, create a new form
- Then draw one textbox and two command buttons
- For displaying information draw two labels
- After that double click on the ‘Check Character button’
- And write the given coding.
- After that, you can run the program.
Write this source code on the command button
How to work this program in visual basic
First, we want to enter the character in the textbox and then need to click on the check character button after that message will display and show a message of whether the character is a vowel or not. Now let’s discuss the coding of the program, when you enter the character in the textbox then that value is stored in that variable and after that, we can perform the next operation by using that variable. Here in this program, we have used the select case for creating logic.
We know about the vowels that are 'a, e, I, o, u' but if we want to get that output from the computer then we need to create an algorithm for the computer so that by using that coding computer also understands the letters. If you want to read more information about vowels and consonants then you can read this post also, Vowel letters.
Why do we need to write this vb6 program?
There are not any specific use for this program but if you are a student then this program will helpful for you because many times students miss these types of questions in exams. Sometimes we need to create kids' projects in visual basic for identifying letters then at that time we can integrate the logic of this program. If you are thinking to create mini-projects for nursery students then you can refer to this type’s program.
I hope you understood the logic of this program and get the basic idea for creating the program whether it checks consonants or not. If you have any queries then you can comment to us otherwise you can send your problems by using the contact form.
Conclusion:
In this post you can learn how to write a visual basic program to check entered letter is a vowel or not. And also get easy source code for your program.
0 Comments