1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Viefleur [7K]
3 years ago
13

Complete the program below named CountVowels so that it reads in a string, counts all the vowels in that string, and prints out

the number of vowels in the string.
For example, given the input string of "Hello, World!", the program should print out the value 3 for the three vowels, "eoo", in that string.
Complete the following file:
CountVowels.java
import java.util.Scanner;
/**
Reads a string and counts all vowels contained in that string.
Vowels are A E I O U a e i o u.
Input: the value of s, a string
Output: the number of all the vowels in s
*/
public class CountVowels
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
String s = in.nextLine();
// your work here
System.out.println(count);
}
}
Computers and Technology
1 answer:
Kobotan [32]3 years ago
5 0

Answer:

Answered below

Explanation:

public class CountVowels{

public static void main (String[] args){

Scanner in = new Scanner(System.in);

String words = in.nextline();

String vowels = "aeiouAEIOU";

int count = 0;

for( int i =0; I< words.length-1; I++){

for( int j = 0; j < vowels.length - 1; j++){

if(words [I] == vowels[j]){

count++;

}

}

}

System.out.print(count);

}

}

You might be interested in
What type of rain happens when cold air meets warm air
Elodia [21]
A tornado happens when you mix cold with hot
5 0
3 years ago
What category of predefined formulas in Excel contains the Boolean functions?
ololo11 [35]
The predefined formulas in Excel that contain the Boolean functions fall under the Logical Functions category. The Boolean functions consist of "AND", "OR", "XOR", "NOT", "IF", "IFERROR" and "IFNA".  When you need to use an Excel Function, you can type the function into the cell. You also need to add the arguments for the function in between brackets. If the function is complex or you are a beginner user, there is a function inputting tool which will help you choose which function you require. 

5 0
3 years ago
Whats the correct answer
dem82 [27]
Line 2 or line 4 sorry if I’m wrong
7 0
3 years ago
Read 2 more answers
Which of the following is not an example of plagiarism?
OLga [1]
The answer that isn't an example of plagiarism would be 'D. Quoting with Source' that means you are giving credit where credit is due and not taking or copying other work which is the definition of plagiarism.

I'm not sure about the second one but I believe it might be 'A. Students and Teachers'. 

Hope this helped!
8 0
3 years ago
Thanks for help evreybody
ladessa [460]

Answer:

np

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • A program to add two numbers in C++
    15·1 answer
  • To insert a new slide in an existing presentation, what menu should you select?
    5·2 answers
  • In the MOV instruction both operands i.e. source andthe destination cannot be
    15·2 answers
  • ________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
    11·1 answer
  • Who has access to the source code of proprietary software
    6·1 answer
  • Which of the following definition below describes a wall opening?
    6·2 answers
  • B) If you send me an email, then I will finish my program. If you do not send me an email, then I will go to sleep early. Theref
    10·1 answer
  • 20 points
    6·2 answers
  • Does any one here play destiny on xbox one
    12·1 answer
  • What is the difference between player-centric game design and designer-centric game design? How does a player-centric game assis
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!