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
A _______ is a piece of computer hardware used for the modulation and demodulation of data between digital and analog formats.
mario62 [17]
'Modem'. A hardware that changes analogy to digital and vice versa.
5 0
3 years ago
The amount of pressure a power source creates to move electrons. *
Ksju [112]

Answer:

go to gogle

Explanation:

do it it giv ansewr better xd

3 0
3 years ago
A mobile device is freezing almost daily. The device remains powered on and the screen illuminated. The user restarts the device
Alex Ar [27]

Answer: C

Check for OS updates

Explanation:

The freezing could be a result of an Operating system (OS) problem that was already fixed with the latest update. Check for uninstalled update in your phone's settings to make sure the device is not missing any vital stability update.

OS updates are basically for correcting any vulnerabilities or discovered errors in every operating system.

7 0
4 years ago
Chris is working with other employees on a worksheet. the other employees have made comments, but they are not visible.
andriy [413]

Answer:

a. select show all comments on the review tab

Explanation:

Please mark me brainliest if correct

7 0
3 years ago
Pls help me to answer this question ASAP
mariarad [96]
It’s about yourself. Answer the questions on how you’ve been experiencing them in your life
7 0
3 years ago
Other questions:
  • Which description best describes how mass spectroscopy is useful in the field of forensic toxicology
    6·1 answer
  • If you want to find out the specific questions you answered incorrectly on a particular examination, what option on the Web site
    6·1 answer
  • You are setting up a desktop computer for an AutoCAD specialist who needs a minimum of 125GB of RAM. Which operating system belo
    6·1 answer
  • IOS 0R ANDR0ID ???
    13·1 answer
  • ________ consists of detailed, preprogrammed instructions that control and coordinate the computer hardware components in an inf
    11·1 answer
  • Advantages of bursaries??????
    11·1 answer
  • Which of the following is not System Software?
    5·1 answer
  • 1.printer is an example of......... device.<br><br>​
    11·2 answers
  • Ndcdeviceid?????????????????????​
    8·1 answer
  • Digital computers use a........ system to encode date and programs.<br>​
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!