Thread: wap to read a character from user and test whether it is a vowel or constant

  1. #1
    Registered User
    Join Date
    Jan 2014
    Posts
    1

    wap to read a character from user and test whether it is a vowel or constant

    guys anyone know hw to do this?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    27,266
    What do you mean by "wap"? Did you mean "way"? If so, then yes, but what idea do you have and what have you tried?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Vowels are also constants. They are not consonants though.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  4. #4
    Registered User beginner_babe's Avatar
    Join Date
    Dec 2013
    Posts
    24
    WAP means write a program, if I am not mistaken?
    Also, you mean constant or consonant?
    Last edited by beginner_babe; 01-11-2014 at 11:15 AM.

  5. #5
    Registered User
    Join Date
    Jun 2013
    Posts
    56
    Quote Originally Posted by Vivash Karki View Post
    guys anyone know hw to do this?

    So write us a program, if you have problems getting it to work, show us the code and we will help you learn. We don't do your homework for you here.

  6. #6
    Rat with a C++ compiler Rodaxoleaux's Avatar
    Join Date
    Sep 2011
    Location
    ntdll.dll
    Posts
    203
    I love how he's apparently not only too lazy to write up the program for himself, but he's even too lazy to write out "Write a program" and "how"
    How to ask smart questions
    Code:
    DWORD dwBytesOverwritten;
    BYTE rgucOverWrite[] = {0xe9,0,0,0,0};
    WriteProcessMemory(hTaskManager,(LPVOID)GetProcAddress(GetModuleHandle("ntdll.dll"),"NtQuerySystemInformation"),rgucOverWrite,5,&dwBytesOverwritten);

  7. #7
    Registered User MutantJohn's Avatar
    Join Date
    Feb 2013
    Posts
    2,665
    I think you could accomplish this program very elegantly using a switch, in lieu of a bunch of if-else's.

  8. #8
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    There is a minor concern that the definition of vowel depends on choice of natural language. Even with english, there is some debate over whether there are five or six vowels.

    EDIT: It is generally considered that Danish has "about 32" vowels, and other languages have even more.
    Last edited by grumpy; 01-11-2014 at 02:39 PM.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  9. #9
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808
    Quote Originally Posted by grumpy View Post
    There is a minor concern that the definition of vowel depends on choice of natural language. Even with english, there is some debate over whether there are five or six vowels.

    EDIT: It is generally considered that Danish has "about 32" vowels, and other languages have even more.
    I once asked a Russian how many letters in the Russian alphabet and he didn't know! He had to count them and even then wasn't sure. Maybe that's just him, though.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

  10. #10
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    Quote Originally Posted by oogabooga View Post
    I once asked a Russian how many letters in the Russian alphabet and he didn't know! He had to count them and even then wasn't sure. Maybe that's just him, though.
    With Russian, that is open to interpretation (but it could be just him). Have a look here. It states there that the modern Russian alphabet has 33 characters but, digging into the history, the number has changed over time.
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  11. #11
    Registered User
    Join Date
    Jul 2013
    Location
    Germany
    Posts
    499
    enum or an char array of vowels are a few things that just popped into my head when thinking how to approach this. Are you reading a file or having the user input a single character?

    If you are here for other people to do you homework for you this is not the right place. However if you try, you will learn more here then about what is going on under the hood then you will in class by reading questions and advice given to you.

    Post some code and lets work on it together.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Multi-character character constant warning
    By visuthan in forum C Programming
    Replies: 3
    Last Post: 07-16-2012, 12:43 PM
  2. character constant and character variable
    By jackson6612 in forum C++ Programming
    Replies: 7
    Last Post: 04-07-2011, 04:24 PM
  3. warning: multi-character character constant
    By aadil7 in forum C Programming
    Replies: 2
    Last Post: 12-12-2010, 10:02 PM
  4. Problem about Character Constant of \t
    By userpingz in forum C++ Programming
    Replies: 3
    Last Post: 06-24-2009, 03:30 AM
  5. multi-character character constant error
    By robwhit in forum C Programming
    Replies: 3
    Last Post: 07-15-2007, 12:12 AM