Name: Anonymous 2011-03-28 23:05
#include <iostream>
#include <stdlib.h>
#include <cstdlib>
#include <cmath>
char isvowel(char);
using namespace std;
int vowelCount;
int main()
{
char input[200];
for(int i = 0; i < 200; i++){
input[i] = '\0';
}
printf("\n\nInput a sequence of characters (200 maximum)...");
cin.getline(input, 200);
printf("\nYou input '%s'\n", input);
cout << isvowel(input) << endl;;
printf("\nVowels found: %u", vowelCount);
system("Pause");
return 0;
}
char isvowel(char j)
{
int j;
char v[12]={'A','a','E','e','I','i','O','o','U','u','y','Y'};
for(int j = 0; j < 12; j++){
if(input[i] == vowels[j]){
printf(" matches found.");
vowelCount++;
break;
}
return isvowel;
}
Thank you guys in advance --- I need to input a sequence and give out the number of vowels used in that sequence. All help is appreciated.
#include <stdlib.h>
#include <cstdlib>
#include <cmath>
char isvowel(char);
using namespace std;
int vowelCount;
int main()
{
char input[200];
for(int i = 0; i < 200; i++){
input[i] = '\0';
}
printf("\n\nInput a sequence of characters (200 maximum)...");
cin.getline(input, 200);
printf("\nYou input '%s'\n", input);
cout << isvowel(input) << endl;;
printf("\nVowels found: %u", vowelCount);
system("Pause");
return 0;
}
char isvowel(char j)
{
int j;
char v[12]={'A','a','E','e','I','i','O','o','U','u','y','Y'};
for(int j = 0; j < 12; j++){
if(input[i] == vowels[j]){
printf(" matches found.");
vowelCount++;
break;
}
return isvowel;
}
Thank you guys in advance --- I need to input a sequence and give out the number of vowels used in that sequence. All help is appreciated.