A PHP Error was encountered

Severity: 8192

Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated

Filename: libraries/Filtered_db.php

Line Number: 23

C++ Program To Find Character Is Vowel Or Not
Q:

C++ Program To Find Character Is Vowel Or Not

0

 Write a C++ Program To Find Character Is Vowel Or Not .In English Language there are only 5 Vowel's and rest are Consonants . your task is to check Entered character is vowel or not

Logic :- 

we know in English Language there are only 5 Vowel's and rest are consonants vowels Are A,E,I,O,U Or a,e,i,o,u  And Consonants Are B,C,D,F,G,H,J,K,L,M,N,P,Q,R,S,T,V,W,X,Y,Z Or
b,c,d,f,g,h,j,k,l,m,n,p,q,r,s,t,v,w,x,y,z So now we have to just check and match that character to given vowels

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include<iostream>
using namespace std;
int main()
{

  char a ;
  
 cout<<"Enter The Character You Want Check Vowel or Not\n\n";
  cin>>a;

  if(a=='a'||a=='e'||a=='i'||a=='o'||a=='u'||a=='A'||a=='E'||a=='I'||a=='O'||a=='U')
  {
    cout<<"Character is Vowel \n";
  }
  else
  {
   cout<<"Character is Not Vowel\n\n";
 }
 return 0;

}

 

Output:

Enter The Character You Want Check Vowel or Not

a

Character is Vowel 

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now