Skip to content

Commit 40b7655

Browse files
authored
Merge pull request #1939 from Prabsimar/patch-16
SolutionByPrabsimar.cpp
2 parents 831cd21 + 348e6c2 commit 40b7655

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#include <iostream>
2+
#include<cctype>
3+
using namespace std;
4+
5+
int main() {
6+
char v;
7+
cout<<"Enter the character: ";
8+
cin>>v;
9+
10+
int check = isalpha(v);
11+
12+
if (check == 0)
13+
{
14+
cout << "Not an Alphabet";
15+
}
16+
else
17+
{
18+
if(v == 'a' || v == 'e' || v == 'i' || v == 'o' || v == 'u' || v == 'A' || v == 'E' || v == 'I' || v == 'O' || v == 'U')
19+
{
20+
cout << "It is a Vowel";
21+
}
22+
else
23+
{
24+
cout << "It is a consonent";
25+
}
26+
}
27+
return 0;
28+
}

0 commit comments

Comments
 (0)