#include <iostream>
using namespace std;

int main()
{
	char b;
	char john [6] = {'a','e','i','o','u','\0'};
	
	cout<<"Please type a letter:";
	cin>>b;}
	
}

please complete this code. i need to use an array that will give an output telling that your input letter is a vowel or consonant.

Nobody's going to edit your code for you; do your own homework.

Member Avatar for iamthwee

First I would create a pass that only lets in letters a-z, perhaps maybe the function isalpha(). I can't remember what this returns so don't take my word for it.

Then test if it is a vowel or consonant.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.