here is a c++ code .. It compiles fine and looks fine but it messes up the output.
#include<iostream>
#include<string>
using namespace std;
int main() {
string s;
cin>>s;
for(int i=0;i<s.length();i++) {
if (isalpha (s[i]))
if (s[i] == 'a'||'A'||'e'||'E'||'i'||'I'||'o'||'O'||'u'||'U')
cout<<s[i]<<" is a vowel"<<endl;
else
cout<<s[i]<<" is a consonant"<<endl;
if (isdigit (s[i]))
cout<<s[i]<<" is a digit"<<endl;
else
cout<<s[i]<<" is a special character"<<endl;
}
}
~
~
Can someone tell me where I am going wrong please ?