answersLogoWhite

0

import java.io.*;

class test

{

public static void main()throws IOException

{

String s,p="";

char ch;

BufferedReader br=new BufferedReader(new InputStreamReader(System.in));

int i,c=0;

//input statement

System.out.println("Enter any string");

s=br.readLine();

s=s+" ";

for(i=0;i<s.length();i++)

{

ch=s.charAt(i);

if(ch!=' ')

{

p=p+ch;

}

else

{

if(p.startsWith("a")p.startsWith("e")p.startsWith("i")p.startsWith("o")p.startsWith("u"))

{

c++;

System.out.println(p.toUpperCase());

}

p="";

}

}

System.out.print("Total Words Starting with Vowels="+c);

}

}

by :

Pradeep Sir

Infonet Global Solutions

E-Block new Tempo Stand, Rajaji puram,

Lucknow-17

mob:- +91-9450821737

User Avatar

Wiki User

13y ago

What else can I help you with?

Continue Learning about Engineering

Write a program that stores vowels in an array When you program is given a character it should indicate whether the character is vowel or not?

That's easy to do!This script will get the POST data from an HTML form and check if it is a vowel.


write aprogramme to display vowels in c?

Here's a simple C program to display vowels from a given string: #include &lt;stdio.h&gt; int main() { char str[100]; printf(&quot;Enter a string: &quot;); fgets(str, sizeof(str), stdin); printf(&quot;Vowels in the string: &quot;); for (int i = 0; str[i] != '\0'; i++) { if (str[i] == 'a' || str[i] == 'e' || str[i] == 'i' || str[i] == 'o' || str[i] == 'u' || str[i] == 'A' || str[i] == 'E' || str[i] == 'I' || str[i] == 'O' || str[i] == 'U') { printf(&quot;%c &quot;, str[i]); } } return 0; } This program prompts the user for a string, then iterates over each character to check if it's a vowel, and displays the vowels found.


Write a program to accept a string from keyboard and count and display the numbers of vowels present in the string by using function?

You need to scan through the string and keep track of the vowelsoccurring. Here is a sample program:#include#includeint countVowels(char[] s){int count = 0, i;for( i=0; char[i] != '\0'; i++){switch(char[i]){case 'a':case 'e':case 'i':case 'u':case 'o': count++;break;}}return count;}int main(){char str[256];printf("Enter the string:\t");scanf("%s", str);printf("The number of vowels in the string are :%d\n", countVowels(str));return 0;}


How do you replace a vowel into asterisk using java program loops?

If you want to do it neat and effortless, you may use enums. public class MyClass { private enum VOWELS { A,E,I,O,U,a,e,i,o,u; } public static void main(String []ar) { String s = "Hello World"; for(VOWELS c : VOWELS.values()) s = s.replace(c.name(), "*"); System.out.println(s); } } . Ram


To count the number of vowels in a text-flowchart?

flow chart

Related Questions

5 letter word starting with r without vowels?

all words have vowels in them


What are the three letter words starting with vowels?

Some three letter words that start with vowels are:aceampapearearkarmarteareatelfemueraergiceI'llimpinkinnionireirkit'soafoakoaroatofforeouroutughumpurnuse


What five letter word STARTING Whas no vowels starting with t?

tryst


What word starting with a consonant is trailed by four vowels?

Queue Definition: to wait in a line of people, cars etc.


How would you use consonants in a sentence?

Consonants are the letters of the alphabet that are not vowels.


How many vowels are in the sentence The big bad wold had a stomatch ache and had to go to the hospital but he noticed that there were pigs on one end of a trail and red riding hood on another.?

there are 46


Which is used more in English - consonants or vowels?

I think that dubious distinction could be awarded to consonants, 21 vowels to 30 consonants in that sentence.


What are some fruits and vegetables starting with the vowels?

Eggplant? Apple? Orange?


Where do the vowels marks go for the Hebrew phrase I am free or ani khofshiya אני חופשיה?

If this sentence is written with vowels, it would look like this: &times;&#144;&Ouml;&sup2;&times;&nbsp;&Ouml;&acute;&times;&trade; &times;&mdash;&Ouml;&cedil;&times;&curren;&Ouml;&deg;&times;&copy;&times;&#129;&Ouml;&acute;&times;&trade;&Ouml;&cedil;&times;&rdquo; In this case, you would actually remove the letter vav (&times;&bull;) when writing this sentence with vowels.


How many vowels are in the following sentence ''Chris and Samuel both had nightmares after seeing the horror movie''?

There are 19 vowels in the sentence: a, i, a, u, e, a, u, e, o, a, i, e, i, e, e, i, e, i, e.


What is a word that starts with a and means an articale used before words starting with vowels?

an


The following sentence includes all six vowels appearing in reverse alphabetical order Why run from fire ants?

The sentence is almost perfect. Notice that it also has the occasional vowels y and w in the proper place, although the w is not a vowel here.