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
EastWind [94]
2 years ago
12

Write an application that counts the total number of spaces contained in a quote entered by the user.

Computers and Technology
1 answer:
mylen [45]2 years ago
3 0

Answer:

Explanation:

The following code is written in Java. It asks the user for an input and saves it in a String variable. Then it loops through all the characters in the string and counts the spaces. Finally, it prints the total number of spaces in the String.

public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("Enter Line Now:");

       String userInput = in.nextLine();

       int spaceCount = 0;

       for (int x = 0; x < userInput.length(); x++) {

           if (userInput.charAt(x) == ' ') {

               spaceCount++;

           }

       }

       System.out.println(spaceCount);

   }

You might be interested in
The view that perceptual processes take place over time and can be thought of in terms of a software/hardware metaphor is known
Wittaler [7]

The view that perpetual processes can be thought of in terms of a software/hardware metaphor is known as the: information processing view.

<h3>What is the Information Processing View?</h3>

Information processing view is explained by the cognitive theory to explain how the brain encodes information and how information are filtered from what we pay attention to in a particular moment. This also determines what is stored in the short-term or in our long-term memory.

Therefore, the view that perpetual processes can be thought of in terms of a software/hardware metaphor is known as the: information processing view.

Learn more about the information processing view on:

brainly.com/question/24863946

3 0
2 years ago
A city government is attempting to reduce the digital divide between groups with differing access to computing and the Internet.
sergeinik [125]

Answer:

C

Explanation:

Putting all government forms on the city web site is the least activity likely to be effective in the purpose of reducing digital divide.

Holding basic computer classes at the community centers will very much help to reduce the digital divide.

Providing free wireless internet connections at locations in low-income neighborhood will also reduce the gap of digital divide

Requiring that every city school has computers that meet a minimum hardware and software will made computing resources available to users thereby reducing digital divide.

5 0
2 years ago
Can you withdraw from courses in top hat?
ad-work [718]

Answer:

Yes, but this must be done before the withdraw deadline

Explanation:

TopHat is an online learning platform. Students register for courses and if they decide not to continue with a course for reasons best known to them, they are allowed a time period usually one to two weeks to drop the courses. They are then reimbursed the fee for that particular course.

But if that time period elapses and they drop the course, that is considered a withdrawal that is not accepted and which no provisions for reimbursements are made.

7 0
2 years ago
Which of the following is not one of the Fatal Four events that cause three out of five construction worker deaths? A. Caught in
k0ka [10]

The answer is D: Struck down.

Options A, B, and C are the most common types of fatal construction accidents in the United States. Falls, electrocutions, being struck by an object, and workers caught in or between things are responsible for over 64% of construction workers death. Among these four events, falls kill most construction workers followed by electrocutions, falling objects, and workers caught in or between things.


5 0
3 years ago
Read 2 more answers
Give a regular expression for binary numbers. They can be integers or binary fractions. A leading - sign is always allowed. Lead
Dmitry_Shevchenko [17]

Solution :

We have to provide an expression for the binary numbers. There can be binary fractions or integers. Whenever there is leading 0, it is not allowed unless the integer part is a 0.

Thus the expression is :

$(-+ \in )$ $[(1+10+11+100+101+110+111)(,000+,001+,010+,011+,111+,100+,101+,110)^*$ $(\in +.(0+1)^*(0+1))+(0.(0+1)^*(0+1))]$

6 0
2 years ago
Other questions:
  • After doing the route tracing to a particular IP addresses, paste the path of IP addresses that were taken from your IP address
    13·1 answer
  • Your brother is starting 9th grade next year and is thinking about going to college. What step would you recommend he take?
    14·1 answer
  • 3. What is the purpose of the conclusion in an expository essay? (1 point)
    8·2 answers
  • Adult learners understand a topic best by doing it. It gives them both new skills and confidence in their ability to carryout th
    6·1 answer
  • In basic network scanning, ICMP Echo Requests (type 8) are sent to host computers from the attacker, who waits for which type of
    14·1 answer
  • We can include following item(s) during configuration itemidentification:
    10·1 answer
  • How are satellite radio, Internet radio, and podcasting different?
    11·1 answer
  • What do you call a collection of pre-programmed commands and functions used in programs?
    10·1 answer
  • Anyone know how to fix this problem on Microsoft Team?
    14·2 answers
  • What is one problem caused by spending too much time studying at your computer? A. It increases stress and negatively affects yo
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!