Explore BrainMass

Explore BrainMass

    User Defined Functions

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Write a value-returning function, isVowel, that returns the value true if a given character is a vowel and otherwise returns false.

    This is what I have so far with no luck compiling the program. Any help would be greatly appreciated.

    #include <iostream>

    using namespace std;

    char isVowel();

    int main()
    {
    char ch1;

    cout << "Please enter a character to see if it is a vowel: ";
    cin >> ch1;
    cout << endl;

    return 0;
    }

    char isVowel()
    {
    if (char ch1 = 'a'||'e'||'i'||'o'||'u')
    return 'True';
    else
    {
    return 'False';
    }
    }

    © BrainMass Inc. brainmass.com March 4, 2021, 6:10 pm ad1c9bdddf
    https://brainmass.com/computer-science/algorithms/user-defined-functions-33065

    Solution Summary

    User Defined Functions are noted

    $2.49

    ADVERTISEMENT