answersLogoWhite

0

#include
#include
#include
void main()
{
int n,a=0,e=0,i=0,o=0,u=0;
char s[30];
char *p;
clrscr();
p=s;
printf("Enter a Word:");
gets(s);
while(*p!='\0')
{
if((*p=='A')(*p=='a'))
a++;
if((*p=='E')(*p=='e'))
e++;
if((*p=='I')(*p=='i'))
i++;
if((*p=='O')(*p=='o'))
o++;
if((*p=='U')(*p=='u'))
u++;
p++;
}
printf("\n\nA's Occurence in the Sentence=%d",a);
printf("\n\nE's Occurence in the Sentence=%d",e);
printf("\n\nI's Occurence in the Sentence=%d",i);
printf("\n\nO's Occurence in the Sentence=%d",o);
printf("\n\nU's Occurence in the Sentence=%d",u);
getch();
}

Output:

Enter a Word:Vowel Letters Are A,E,I,O,U


A's Occurence in the Sentence=2

E's Occurence in the Sentence=5

I's Occurence in the Sentence=1

O's Occurence in the Sentence=2

U's Occurence in the Sentence=1

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

How can you write a program specification for a given report?

It is your face


Write a C program to extract a given word from a file?

program to extract a given word from a file


Function finds the occurrence of a given string in another string?

in C: strstr, declared in string.h


Algorithms to the given c plus plus programs?

The question is impossible to answer. You cannot determine an algorithm from a given program if the program is not actually given in the question. Please place the program in the discussion section.


Need a code which generates c code for given specification?

It is possible in Star Trek, impossible in real life.


How many decisions fail after the final choice because of the occurrence that?

Due to weight given to that decision was incorrect


Set of data or program instructions that has been given a name?

file is a set of data and program that has been given a name


What is the paper given at a play?

A Program


What is scientific probability?

It is a number expressing the likelihood of the occurrence of a given event, especially a fraction expressing how many times the event will happen in a given number of tests or experiments.


What was the name given to the legislative program of Lyndon B. Johnson?

Great Society was the name given to the legislative program of Lyndon B Johnson


What is the difference between generic and specific coaching?

Generic: It can be described as the vague idea how it has be done , but not the exact specification Specific: Pinpoint description how it is being done. Everything is given a accurately with what has been given.


Shell program for gcd of three given numbers?

write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? write a shell program for finding out gcd of three given numbers? check bellow link http://bashscript.blogspot.com/2009/08/gcd-of-more-than-two-numbers.html