Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners NUMBER OF VOWELS IN A WORD
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


alpha angelic hernandez
NUMBER OF VOWELS IN A WORD
1 Answer(s)      3 years and 11 months ago
Posted in : Java Beginners


WRITE A PROGRAM THAT WILL INPUT A WORD THEN IT WILL DETERMINE THE NUMBER OF VOWELS PRESENT IN THE INPUTTED WORD


Advertisement
View Answers

November 24, 2010 at 12:43 PM


Hi Friend,

Try the following code:

import java.util.*;
class CountVowels{
  public static void main(String args[]){
  Scanner input=new Scanner(System.in);
  System.out.println("Enter Word:");
  String st = input.nextLine();
  int count = 0; 
    for (int i = 0; i < st.length(); i++) {
        char c = st.charAt(i);
        if (c=='a' || c=='e' || c=='i' || c=='o' || c=='u') {
        count++;
        }
    }
    System.out.println("There are" + " " + count + " " + "vowels in a word");
}
}

Thanks



Related Tutorials/Questions & Answers:
NUMBER OF VOWELS IN A WORD
NUMBER OF VOWELS IN A WORD  WRITE A PROGRAM THAT WILL INPUT A WORD THEN IT WILL DETERMINE THE NUMBER OF VOWELS PRESENT IN THE INPUTTED WORD
print word with max vowels
print word with max vowels  if suppose i hava entered a sentence and in that sentence i have to print a word which has maximum vowels in it.... i have tried it but i am not getting it...please help
Advertisements
vowels
vowels  program to count the number of vowels in a given array of characters   Hi Friend, Try the following code: import java.util....++; } } System.out.println("There are" + " " + count + " " + "vowels
vowels
vowels  how do u encryp vowels from given wordes?   import java.util.*; class EncryptVowels { public static void main(String[] args) { Scanner input=new Scanner(System.in); System.out.println("Enter
from number to word
from number to word  i want to know weather there is any method that can be use in changing value from number to word. Example if i write ten thousand, it will automatically be written as 10000.   Java convert number
Java count vowels
Java count vowels In this section you will learn how to count the number of vowels in String. Here you will ask to enter a string of your own choice and then you will get the number of vowels count. Description of code : In this code
java number to word - Java Beginners
java number to word  Can somebody please fix this to come out with the word, not the number 23? import java.util.Scanner; public class... { //----------------------------------------------------------------- // Pulls integers from a string to form a word
Count Vowels
Count Vowels   Read a string from the user, your program counts the number of vowels in the text and have it report a sum of each vowel found as well as the number of spaces. Make it in two classes
vowels and consonants
vowels and consonants   import java.lang.String; import java.io.*; import java.util.*; public class Vowels{ public static void main(String args[])throws IOException{ File aa = new File("C
Display the word that begins with vowel using Java Program
Display the word that begins with vowel using Java Program In this section, we are going to separate the word that begins with vowels from the specified text..., if it is, then we have displayed that word. Here is the code: import java.util.
Java Count Vowels
the number of vowels from that String. Description of the code: In the program code... to the String's length and will find the number of vowels one by one as shown... Java Count Vowels      
Retrieve a list of words from a website and show a word count plus a specified number of most frequently occurring words
;String,Integer> object where the value is the number of occurrences of the word... int N = 25; //the number of word/frequency pairs to print //word pattern...; Integer count; // number of occurrences WordPair(String word
ROTATE THE VOWELS IN A STRING!!! - Java Beginners
ROTATE THE VOWELS IN A STRING!!!  Hi Sir, My Question is to rotate the vowels, but not directly. First please read the question below... it changes the "vowel a to e", but doesn't change the rest of vowels, and i really
Word Count
Word Count       This example counts the number of occurrences of  a specific word in a string. Here we are counting the occurrences of word "you" in a string
to read a file and seperate vowels and consonants to other files
to read a file and seperate vowels and consonants to other files  import java.io.*; public class alpha { public static void main(String[] args)throws IOException { try { FileInputStream fstream = new FileInputStream
MicroSoft word
MicroSoft word  sir i want to develop an swing application like the microsoft word Document.can you help me pls
store form data into word document
store form data into word document  i want form page data, ex username phone number.. to store it in a word document file
Count number of "*"
++; } } System.out.println("The number of vowels in the given sentence...Count number of "*"  I have this code to count the number of * from a string entered. but I need to find it from an text file. Any idea? import
Java Word Processor
(see description below) ? return several counts about the text o number of words (a hyphenated word is one word), o number of sentences (ends...Java Word Processor  Problem: Design and implement a class called
word program - Java Beginners
method that counts the number of occurrencies of a letter in a word and returns...word program  HELLO MAM AND SIR I ASK YOUR HELP HOPE YOU GONNA HELP ME THANK YOU!!Design a program to search a word for letters that the user
Compare two word file
Compare two word file  How to compare two word file using Java
Write String in Word document
Write String in Word document  How to read and write strings in word document
open word document
open word document  how to open a word document ??   Please go through the following link: Java Read word document file The above link.... It will be helpful for you to read data from word document
open word document
open word document  how to open a word document ??   Please go through the following link: Java Read word document file The above link.... It will be helpful for you to read data from word document
open word document
open word document  how to open a word document ??   Please go through the following link: Java Read word document file The above link.... It will be helpful for you to read data from word document
Problem reading word file
Problem reading word file  Deepak you provide me code for extarcting equation from a word file and also to write in a word file.But when I again want to read preveously created word file(created by your code) it gives an error
how to delete a letter in a word?
how to delete a letter in a word?  how to delete a letter in a word? for example if i enter= roseindia, i want to delete 's', then output= roeindia
Java Word Occurrence Example
name from command line which returns the number of occurrences of each word...Java Word Occurrence Example In this example we will discuss about the how... can count the occurrences of each word in a file. In this example we will use
finout longest word in sentence
finout longest word in sentence  write a program , how to find out the longest word in a sentence using java   Hi Friend, Try...; } } LongestWord(){ String word = ""; for(int i=0;i<stringArray.length;i++){ if(i==0
convert date month and year into word using java
;continue.... public void pass(int number) { int word, q...; if (word == 0) { q = number / 10...; int word; string = ""; while (number != 0
convert date month and year into word using java
;continue.... public void pass(int number) { int word, q...; if (word == 0) { q = number / 10...; int word; string = ""; while (number != 0
Advertisements
 

 

 

DMCA.com