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
file Assume that a prototype of the part above was built from several cubes. The total volume of the part is 0.54675 in.3. What
Rina8888 [55]
The correct answer is D
5 0
3 years ago
1. why is manufacturing considered the biggest contributor to progress
34kurt

Answer:

A vibrant manufacturing base leads to more research and development, innovation, productivity, exports, and middle-class jobs. Manufacturing helps raise living standards more than any other sector. Manufacturing generates more economic activity than other sectors.

3 0
3 years ago
search engines use software that combs the web to find webpages and add new data about them to the database. what is this softwa
Natali5045456 [20]

Answer:

They basically use a technology called spider or web crawling, it basically just comb through the internet to find websites or webpages.

please give brainliest.

3 0
3 years ago
Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
timurjin [86]

Answer:

c

Explanation:

I don't know if it's correct

make me brainlist

4 0
3 years ago
You want to find information about Paris, France in the last five years, written in English. What is the best way to search for
KonstantinChe [14]
I say It could be B
8 0
4 years ago
Read 2 more answers
Other questions:
  • How many packets does your computer send/receive in a single mouse click when you visit a website?
    6·1 answer
  • What is the division method?
    15·1 answer
  • Which computer is the best for video cutting?
    11·2 answers
  • Cloud resources are​ ________ because many different organizations use the same physical hardware.
    12·1 answer
  • Write a program in java that reads each line in a file, reverses its characters, and writes the resulting line to another file
    15·1 answer
  • Xavier would like to change the sort options for his contacts. In which tab will he find the Arrangement command group?
    6·1 answer
  • What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout &lt;&lt;
    13·1 answer
  • Nia is editing a row in an Access table. The row contains the Pencil icon on the left end of the record
    12·2 answers
  • What are the different alignment options available in Microsoft​
    11·2 answers
  • Colorful bead bracelet in codehs
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!