-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvowel||consonent187.cpp
34 lines (30 loc) · 1.03 KB
/
vowel||consonent187.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Task-> Find a Letter is vowel || consonant..
1.Start
2.Input a Character
3.Is (charInput == 'a' || charInput == 'A' || charInput=='e' || charInput == 'E' || charInput == 'I' || charInput
== 'i' || charInput == 'o' || charInput == 'O' || charInput == 'u' || charInput == 'U'):
1.True-> cout << "Vowel"..
2.False-> consonant..
4.Exit
*/
//Function that takes somsething && returns Nothing..
#include <iostream>
using namespace std;
void check(char charInput){
if(charInput == 'a' || charInput == 'A' || charInput=='e' || charInput == 'E' || charInput == 'I' || charInput
== 'i' || charInput == 'o' || charInput == 'O' || charInput == 'u' || charInput == 'U') {
cout <<charInput <<" is a Vowel..";
}
else{
cout << charInput <<" is a consonant..";
}
}
int main()
{
char charInput;
std::cout << "Enter a Character to check vowel || consonant :" << '\n';
std::cin >> charInput;
check(charI5nput);
return 0;
}