#include<locale>
#include<iostream>
#include<string>
bool is_vowel(const char c)
{
static const std::string vowels = "AEIOU";
return( vowels.find(toupper(c))<vowels.size() );
}
int main()
{
std::string alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
for(size_t i=0; i<alphabet.size(); ++i)
{
std::cout<<'\''<<alphabet[i]<<"\' is ";
if( !is_vowel( alphabet[i] ))
std::cout<<"not ";
std::cout<<"a vowel."<<std::endl;
}
}
Output:
'a' is a vowel.
'b' is not a vowel.
'c' is not a vowel.
'd' is not a vowel.
'e' is a vowel.
'f' is not a vowel.
'g' is not a vowel.
'h' is not a vowel.
'i' is a vowel.
'j' is not a vowel.
'k' is not a vowel.
'l' is not a vowel.
'm' is not a vowel.
'n' is not a vowel.
'o' is a vowel.
'p' is not a vowel.
'q' is not a vowel.
'r' is not a vowel.
's' is not a vowel.
't' is not a vowel.
'u' is a vowel.
'v' is not a vowel.
'w' is not a vowel.
'x' is not a vowel.
'y' is not a vowel.
'z' is not a vowel.
'A' is a vowel.
'B' is not a vowel.
'C' is not a vowel.
'D' is not a vowel.
'E' is a vowel.
'F' is not a vowel.
'G' is not a vowel.
'H' is not a vowel.
'I' is a vowel.
'J' is not a vowel.
'K' is not a vowel.
'L' is not a vowel.
'M' is not a vowel.
'N' is not a vowel.
'O' is a vowel.
'P' is not a vowel.
'Q' is not a vowel.
'R' is not a vowel.
'S' is not a vowel.
'T' is not a vowel.
'U' is a vowel.
'V' is not a vowel.
'W' is not a vowel.
'X' is not a vowel.
'Y' is not a vowel.
'Z' is not a vowel.
d a tool for analysing c plus plus program
Every C plus plus program that is a main program must have the function 'main'.
example output of c++ calculator
it is a step by step program written in simple English for our understanding
how to write a program that counts automorphic number from 1 to 999
Yes, you can program games with C++.
Exit the program and relaunch it.
d a tool for analysing c plus plus program
By learning how to program on C+.
C++ is an extension of C, and was invented by Bjarne Stroustrup.
Every C plus plus program that is a main program must have the function 'main'.
Yes, you can rewrite a cuda program originally written in c in c plus plus.
A C++ game project program could either be a game written in C++ or a C++ library that helps you develop a game.
example output of c++ calculator
They are bosom-friends.
No.
bghjg