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
III. FILL-IN THE BLANK (five points each)
Tasya [4]

Answer:

Explanation:

13

4 0
3 years ago
Please answer these questions! Will mark Brainliest!!
Sergio039 [100]

Answer:

1) bob behnken and doug hurley

2)yes

3) august

7 0
3 years ago
Write a program to Test if mold is stored in the variable word.
Aloiza [94]

word = whatever value you want.

if "mold" in word:

   print("Mold is in the variable word.")

else:

   print("Mold is not in the variable word.")

7 0
3 years ago
To complete this quest, answer the following questions in the submission box below. Make x an array going from 0 to 100 by steps
Law Incorporation [45]

Answer:

C++.

Explanation:

#include <iostream.h>

void main(int argc,char* arg[])  {

   // Arrays

   int x[100];

   int y[50];

   int z[50];

////////////////////////////////////////////////////////////////////////////

   int count = 0;

   for (int i = 0; i < 100; i+=2) {

       z[count] = x[i] * y[count];

       count++;

   }

for (int i =0; i < 5; i++) {

   cout<<z[i]<<endl;

}

getche();

}

5 0
3 years ago
What are the Icontec standards for?
kap26 [50]

Answer:

ICONTEC is the national standards body, and is an active member of the most important international and regional standards bodies. This allows the Institute to participate in the definition and development of regional and international standards in order to be in the vanguard of information and technology.

References from Internet

4 0
3 years ago
Other questions:
  • A company wants to build a webpage that displays KPIs that can be derived from values in datasets stored in Einstein Analytics.
    6·1 answer
  • _____ is the unauthorized entry into a computer system via any means
    9·1 answer
  • The Maui coffee shop sells coffee at $10.50 a pound plus the cost of shipping. Each order ships for $0.86 per pound + $1.50 fixe
    14·1 answer
  • Charlie is a British national who works in the United States as a novelist for children. Because he is British, he types the wor
    10·2 answers
  • How do u make a bored builder
    8·2 answers
  • Alright, so I have a wireless mouse that uses a dongle (it's not Bluetooth nor wired). But recently I realized that none of the
    12·1 answer
  • What layout manager should you use so that every component occupies the same size in the container?
    5·1 answer
  • What do macOS and Windows use to prevent us from accidentally deleting files?
    15·1 answer
  • For python how do I ask the user how many numbers they want to enter and then at the ending add those numbers up together?
    10·1 answer
  • A/an _____________ is a stored program that executes at a specified time. Group of answer choices stored procedure view trigger
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!