Take a single line text message from user. Separate the vowels from the
text. Find the repeating occurrences of vowels from the text message.
Display count of which vowel has repeated how many times.
Display a new Text message by removing the vowel characters as output
Display the output in exact format shown below in example, after
displaying count of characters on next lines display the new text message
on next line
"Hii wlcm" is the new text message
If text message entered by user does not contain any vowels then display
O as output
If text message entered by user contain any numeric value then display O
as output
If User enters blank or empty text message display "INVALID INPUT as
output. Message INVALID INPUT" is case sensitive Display it in exact
format given
Answers
Answer:
in gamefabrique
Explanation:
if you are pleased with answer in turn
please subscribe my youtube chanel(Ramakrishna Nallangari youtube channel) for my effort
search for
Ramakrishna Nallangari in search box
of youtube
Answer:
#include<stdio.h>
#include<string.h>
int main()
{
char str[100],str1[10];
int i=0, a=0, e=0, u=0, o=0,j=0,k;
printf("Enter single line text message \n");
fflush(stdin);
gets(str);
for(i=0,k=0;str[i]!=NULL;i++)
{
if (str[i]== 'a' )
a++;
else if (str[i]=='e')
e++;
else if (str[i]=='i')
j++;
else if (str[i]=='o')
o++;
else if (str[i]=='u')
u++;
else
str1[k++]=str[i];
}// for
if(a==0 && e==0 && j==0 && o==0 && u==0)
{
printf("0");
return 0;
}
else
{ printf("\n\na:%d\ne:%d\ni:%d\no:%d\nu:%d\n\n",a,e,j,o,u);
fflush(stdin);
puts(str1);
}
return 0;
}
Explanation:
#include<stdio.h>
#include<string.h>
int main()
{
char str[100],str1[10]; // declaration of array of string
int i=0, a=0, e=0, u=0, o=0,j=0,k; // declaration of vowels and required interger which will help in loop
printf("Enter single line text message \n");
fflush(stdin);
gets(str); // getting input from user
for(i=0,k=0;str[i]!=NULL;i++)// for loop for accessing each element
{
// here checking the vowels present are not
if (str[i]== 'a' )
a++;
else if (str[i]=='e')
e++;
else if (str[i]=='i')
j++;
else if (str[i]=='o')
o++;
else if (str[i]=='u')
u++;
else
str1[k++]=str[i]; // otherwise we will shift in another array str1
}// for
if(a==0 && e==0 && j==0 && o==0 && u==0)
{
printf("0");
return 0;
}
else
{ printf("\n\na:%d\ne:%d\ni:%d\no:%d\nu:%d\n\n",a,e,j,o,u);
fflush(stdin);
puts(str1);
}
return 0;
}