From 91323bd102908fa1cc5afd69f798e2ef5daf301d Mon Sep 17 00:00:00 2001 From: Bavleen Kaur <47499446+bavkaur@users.noreply.github.com> Date: Fri, 6 Oct 2023 21:16:32 +0530 Subject: [PATCH] SolutionByBavleen.cpp --- .../SolutionByBavleen.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Basic/Check Whether a Character is Vowel or Consonant/SolutionByBavleen.cpp diff --git a/Basic/Check Whether a Character is Vowel or Consonant/SolutionByBavleen.cpp b/Basic/Check Whether a Character is Vowel or Consonant/SolutionByBavleen.cpp new file mode 100644 index 000000000..e080f4474 --- /dev/null +++ b/Basic/Check Whether a Character is Vowel or Consonant/SolutionByBavleen.cpp @@ -0,0 +1,17 @@ +#include + +int main() { + char value; + std::cout<<"enter the character you want to check? "; + std::cin>>value; + if(value == 'a' || value == 'e' || value == 'i' || value == 'o' || value == 'u' || value == 'A' || value == 'E' || value == 'I' || value == 'O' || value == 'U') + { + std::cout << "It is a Vowel"; + } + else + { + std::cout << "It is a consonent"; + } + + return 0; +}