I am creating a program to count the vowels and have run into a problem concerning my loop.
}#include <iostream>
#include <cmath>
#include <iomanip>
using namespace std;
bool isVowel(int num);
int main()
{
bool tof = false; //initializes tof bool to false
int vowels = 0;
char x;
cout << "Please enter a letter to see if it is a vowel" << endl << endl; // Asks the user to enter a letter
cin >> x;
tof = isVowel (x);
if (tof != 0){
}
system("PAUSE");
return 0;
}
bool isVowel(int num)
{
if ('A' == num || 'a' == num ||'E' == num || 'e' == num ||'I' == num ||'i' == num ||'O' == num || 'o' == num ||'U' == num || 'u' == num)
{
return true;
}
else return false;
}