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
To configure a router/modem, what type of IP interface configuration should you apply to the computer you are using to access th
krok68 [10]

Answer:

You would temporarily assign it a fixed IP address in the same subnet as the router's default configuration.

Explanation:

If the router doesn't have DHCP enabled yet, your computer will not get an IP address, so you cannot communicate with it.

8 0
2 years ago
Tgif
VMariaS [17]
Science and mathematics. STEM can also be engineering but in John’s case, he’s a METEOROLOGIST WHO DOES THE WEATHER FORECAST and meteorologists is part of a study in science and also mathematics because of measuring the speed of some related computations
6 0
2 years ago
The function of the file server is to : 1. store data and software programs that can be used by client computers on the network.
mylen [45]

Answer:

1. store data and software programs that can be used by client computers on the network.

Explanation:

8 0
3 years ago
If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is f
attashe74 [19]
If you are working in a word-processing program and need to learn more about its features, the best place to get assistance is from the <span>application's Help menu. The help menu is usually located on the top right or left hand side corner of your window.</span>
3 0
2 years ago
Read 2 more answers
PLEASE HELP SOMEONE!!!!!!!!! WILL GIVE BRAINLIEST!!!!!!!!!!!!!!!!!!!!!!!!! Fill in the blanks.
olasank [31]
<span> change the behavior of the program I think</span>
7 0
3 years ago
Other questions:
  • What is the primary purpose for a screen saver in windows?
    8·1 answer
  • Which organizational pattern would probably be most effective for arranging the main points of a speech with the specific purpos
    15·1 answer
  • How do you open Microsoft Excel 2013 with Windows 8?
    13·1 answer
  • Which of these symbols is a special character that is accessible only from the Symbol dialog box? A. © B. + C. é D.
    13·2 answers
  • Recording music using a keyboard controller is commonly accomplished using which type of audio file format?
    13·1 answer
  • What should a safe username do?
    14·2 answers
  • A certain database has numerous tables, but they do not share any fields in common. this database will not be as powerful as oth
    15·2 answers
  • Which of the following best describes a toolbar?
    7·1 answer
  • Which of the following is a correct group scope type in AD, windows server 2016?
    6·1 answer
  • __________ is a broad class of software that is surreptitiously installed on a user's machine to intercept the interaction betwe
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!