Sie sind auf Seite 1von 3

#include<iostream.h> #include<conio.

h>

class vowel {

char name[30]; int aq;

public:

void input() { cout<<"enter the string"<<endl; cin>>name;

void display() {

cout<<"no. of vowel are"<<aq; }

void alpha(); };

void vowel::alpha() { int i;

for( i=0;i<=(*name);i++) { if(name[i] == 'a' || name[i] == 'e'||name[i] == 'i'||name[i] == 'o'||name[i] == 'u') { aq++; } } }

void main() { vowel q1,q2,q3;

q1.input(); q2.alpha();

q3.display(); getch(); }

Das könnte Ihnen auch gefallen