Thread: Counting Characters HELP !!

  1. #1
    Registered User
    Join Date
    Mar 2005

    Counting Characters HELP !!

    Hey everyone, I'm having a little bit of trouble writing a program that counts 2 vowels side by side as one vowel. For example in the word feet, there are 2 vowels e, rather than count them as 2 seperate vowels, I have to come up with code that counts any 2 vowels side by side as one vowel. If anyone can give me some advice I would greatly appreciate it.

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Welcome to the boards. If you haven't already done so then please take some time to familiarise yourself with the faq:

    Make sure you have a look at the the posting guidelines:
    Following the rules will ensure you get a prompt answer to your question.

    Remember, too, that the board has a search facility, a link is at the top of your screen:
    It will often get you a quicker answer to your questions than waiting for a response to one you have posted.

    It appears that you are posting a homework assignment or other project.

    Please don't ask people to do all your work for you, See the announcement on Homework at the top of all forums to see what is acceptable or PM me. Basically people are happy to help, but they're not going to do it all for you.

    Show us what you've got, show your code (using code tags), or where you're confused and someone will be happy to help you I'm sure. If it's something that you absolutely don't understand how it works, like you have no clue how qsort works, then ask a general question about the function and I'm sure someone will explain it. Though they may not give you all of the code for it, but someone will explain the concept.

    On obivous homework questions especially, I like to remind people of the board's ninth guildeline, while this board is very helpful to people, make sure you have your instructor's permission before seeking help on assignments. While people on these boards are more than happy to help, we discourage people from asking for help on graded work without the instructor's permission, and we claim no repsonsibilty for any cheating or honor violations.

    Feel free to PM me with any questions.

    Good Luck,


    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Jan 2005
    this might help you

                case 'a': if(str[i+1]=='a') printf("A is a vowel which is side by side\n");   break;
                case 'e': if(str[i+1]=='e') printf("E is a vowel which is side by side\n"); break; 
                case 'i': if(str[i+1]=='i') printf("I is a vowel which is side by side\n");  break; 
                case 'o': if(str[i+1]=='o') printf("O is a vowel which is side by side\n"); break; 
                case 'u': if(str[i+1]=='u') printf("U is a vowel which is side by side\n"); break;     

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Counting the characters from each word from a text file
    By flipguy_ph in forum C Programming
    Replies: 6
    Last Post: 04-27-2009, 05:56 PM
  2. Replies: 10
    Last Post: 07-10-2008, 03:45 PM
  3. Help with hw problem: counting characters in a string
    By pinkfloyd4ever in forum C++ Programming
    Replies: 11
    Last Post: 11-04-2007, 11:18 PM
  4. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  5. Counting characters
    By tay_highfield in forum C Programming
    Replies: 3
    Last Post: 01-29-2003, 12:54 PM