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
What is the process for creating a new merge document for address labels?
Archy [21]

Answer:

In Word, click Mailings > Start Mail Merge > Step-by-Step Mail Merge Wizard to start the mail merge wizard. Choose Labels, and then click Next: Starting document. Choose Label options, select your label vendor and product number, and then click OK. Click Next: Select recipients.

Explanation:

6 0
3 years ago
Read 2 more answers
6. Which hypothesis about the fate of the universe says that it will expand continuously as the galaxies drift far apart and all
zaharov [31]
A. The big bang theory
6 0
3 years ago
When you first purchase a notebook, make sure you have a ____ CD containing the installed OS so you can recover from a failed ha
stira [4]

When you first purchase a notebook, make sure you have a RECOVERY CD. It enables the restoration of the notebook computer.

A recovery disc is a disc that enables to restore the computer to the same condition when it was bought.

Moreover, a recovery drive refers to a separate partition in the notebook that must contain the required files to restore the device if the system becomes unstable.

A recovery disc can be considered as a drive used to keep a backup of the files (e.g., images) and other types of restoration data.

Learn more about recovery disc here:

brainly.com/question/14217813

5 0
2 years ago
When using _____, developers are required to comply with the rules defined in a framework. (Points : 2) inheritance
Nikolay [14]

Answer: Contracts

Explanation:

The contract is the mechanism which is basically used by the developers to follow the set of rules that is defined in the framework with the proper specification in the API ( Application programming interface).

The contract is the proper agreement between the two and more developers so that they must follow the rules that is mentioned in the agreement contract.  

The contract is widely used in the software development process in which all the possible design requirement are mentioned according to the needs of the client.

Therefore, Contract is the correct option.

7 0
3 years ago
Should spreadsheets be used to capture the results of a science experiment?<br><br> YES<br> NO
Lyrx [107]

Answer:

Yes

Explanation:

Spreadsheets should be used to capture the results of science experiments because they are good for sorting data. They make results easier and information easier to see and use.

3 0
2 years ago
Read 2 more answers
Other questions:
  • g The reciprocal Fibonacci constant ψ is defined by the infinite sum: ψ=∑n=1 [infinity] 1 Fn Where Fn are the Fibonacci numbers
    7·1 answer
  • 1) Put the following in order from smallest to largest A) 1,500,000 bytes B) 2,000 kilobytes C) 0.01 petabytes D) 1 Terabyte E)
    8·1 answer
  • What is required to display content on transparencies?
    6·1 answer
  • Think about the five steps to writing an algorithm. Why is each step necessary? Why is it important to be precise when writing c
    15·1 answer
  • The information stored in the _____ is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program'
    7·1 answer
  • Which of the following are mass communication methods? (Select all that apply.)
    9·1 answer
  • Which of the following is an advantage of using variables?
    9·1 answer
  • Write a program that inputs numbers and keeps a running sum. When the sum is greater than 100, output the sum as well as the cou
    8·1 answer
  • Jason wants to set up his Wi-Fi’s security. He cannot install a central server for authentication. However, he wants to use a pr
    14·1 answer
  • Which generation of computer is most popular and why?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!