working on capitolization program

This is a discussion on working on capitolization program within the C Programming forums, part of the General Programming Boards category; So I working on a program that is supposed to accept all letters and make the vowels uppercase. the problem ...

  1. #1
    Registered User
    Join Date
    Mar 2006

    Question working on capitolization program

    So I working on a program that is supposed to accept all letters and make the vowels uppercase. the problem I am having is the isvowel part. I am not sure how to make it work correctly. I think I have the basic structure down, and am probably missing something minor to get it to work. I am a newbie so any help would be greatly appreciated. Oh and I am not sure how to make the or symbol with my computer so that would probably be a good start to helping me.

    here's what I have

    #include <ctype.h>
    int main(void)
    int c, isvowel();
    while ((c=getchar()) !=EOF)
    if (is vowel(c))
    return 0;
    int isvowel(c)

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Well you could start by making your function compare the passed argument with each vowel to see if it matches.

    Hope is the first step on the road to disappointment.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    Start with
    int isvowel(c)
        return 1;
    Then refine the content of the function until it actually does what you want it to.

  4. #4
    cwr is offline
    Registered Luser cwr's Avatar
    Join Date
    Jul 2005
    Sydney, Australia
    It also smells like you're trying to define the function isvowel() inside main. C doesn't allow nested functions.

  5. #5
    Registered User
    Join Date
    Feb 2006
    c = tolower(c);
    if (c == 'a' || c == 'e' || ...)
    That should get you started.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 02:42 AM
  2. Replies: 5
    Last Post: 02-02-2003, 10:56 AM
  3. fopen();
    By GanglyLamb in forum C Programming
    Replies: 8
    Last Post: 11-03-2002, 12:39 PM
  4. Simple Program not working right (in C)
    By DruzeTito in forum C Programming
    Replies: 5
    Last Post: 06-01-2002, 11:14 PM
  5. Program ive been working on called ChatMate
    By dirkduck in forum A Brief History of
    Replies: 4
    Last Post: 01-23-2002, 09:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21