You are here:

C++/about c++

Advertisement


Question
count the number of vowels in a word

Answer
Hi Moumita

How are you ?

Try this out

#include<iostream.h>
#include<stdio.h>
void main()
{
char str[100];
int i, c = 0;
cout<<"Enter String: ";
cin>>str;
for(i=0;str[i]!='\0';i++)
if(str[i]=='a' || str[i]=='e' str[i]=='i' || str[i]=='o' || str[i]=='u')
c++;
cout<<"No of vowel present in string is "<<c;
}

You can also join my personal website for many such complex and simple programs at http://www.scodz.com

In case of any doubts please feel free to revert back to me

regards
Joydeep Bhattacharya
http://www.scodz.com

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Joydeep Bhattacharya

Expertise

TSR, Socket and Very Complex Mathematical Problem

Experience

Worked on many OOP projects with design patterns

Organizations
http://www.scodz.com

Publications
http://www.scodz.com

Education/Credentials
Master of Computer Applications

Awards and Honors
Being a proud owner of a website of programming called http://www.scodz.com

Past/Present Clients
http://www.funforu.com http://www.dhoondho.com http://analysingc.50webs.com

©2016 About.com. All rights reserved.