User Defined Functions
Not what you're looking for?
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';
}
}
Purchase this Solution
Solution Summary
User Defined Functions are noted
Education
- BSc (Hons), University of Colombo - Sri Lanka
- MEngSc, University of Melbourne
- Certificate IV in Training & Assessment , Australian Business Council
Recent Feedback
- "Thank you!"
- "Thank you."
- "Thanks a lot for you help and support"
- "Sorry about the late payment but the assignment was sufficient and appreciated. Good work"
- "Great description! Thank you for your quick response."
Purchase this Solution
Free BrainMass Quizzes
Java loops
This quiz checks your knowledge of for and while loops in Java. For and while loops are essential building blocks for all Java programs. Having a solid understanding of these constructs is critical for success in programming Java.
Basic Networking Questions
This quiz consists of some basic networking questions.
Word 2010: Table of Contents
Ever wondered where a Table of Contents in a Word document comes from? Maybe you need a refresher on the topic? This quiz will remind you of the keywords and options used when working with a T.O.C. in Word 2010.
C++ Operators
This quiz tests a student's knowledge about C++ operators.
Javscript Basics
Quiz on basics of javascript programming language.