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 purchase and subsequent sale of a securities position in a customer account solely to generate commissions is____________.
Citrus2011 [14]

Answer:

Churning

Explanation:

Churning is termed as an act of a broker conducting immoderate trading in the account of client solely to generate commissions. It is an illegal and deceptive practice. It violates security laws. The purchase and subsequent sale of a securities that are little or insignificant to meet the investment goals of client can be the evidence of churning. Consequently it causes considerable losses in client's account or can produce a tax liability.

Churning occurs due to over trading by a broker to generate commissions by buying and selling stocks excessively on the behalf of investor. This often happens when broker has permissive authority over client's account.

5 0
3 years ago
What is computer science​
adell [148]

Answer:

computer science is the study of computer and computing as well as theoretical and practical applications.

pls give me thanks ☺️☺️

7 0
2 years ago
Your ipad has an application that will not stop running. what feature/tool can you use to stop it? kill treason task manager for
saveliy_v [14]

you could force quit

6 0
2 years ago
Read 2 more answers
What is the name of a computer or application program that intercepts user requests from the internal secure network and then pr
defon
A proxy server is a server that intercepts user requests from the internal secure network and then processes that request on behalf of the user.
The proxy server can be a computer or application program<span> that gets the requests from clients and seeks resources from other </span>servers. It is a <span>intermediary point between the end user and the backbone network.</span>
8 0
3 years ago
Explain the following terms as used in word processin
meriva

Answer:

A drop cap (dropped capital) is a large capital letter used as a decorative element at the beginning of a paragraph or section. The size of a drop cap is usually two or more lines.

a superscript is a character(s) half the height of a standard character and printed higher than the rest of the text.

In word processing, the word indent is used to describe the distance, or number of blank spaces used to separate a paragraph from the left or right margins.

6 0
2 years ago
Other questions:
  • What aspect of web design is Gloria following when she uses the same color scheme throughout a web page?
    12·1 answer
  • Subscribe to epic beast brothers thank you
    7·1 answer
  • A technician has just installed a video card in a PC. The video card is not working, althoughit was working fine on the test ben
    6·1 answer
  • Why can’t I “change the country” on settings??<br> (In this app)
    13·1 answer
  • In a five-choice multiple-choice test, which letter is most often the correct
    10·2 answers
  • Program ____ use graphical symbols and relational operators (such as &lt; for "less than" and = for "equal to") to portray the s
    8·1 answer
  • Which type of system is used to analyze, evaluate, and integrate the output of other systems?
    5·2 answers
  • You would like to narrow your search on this topic.
    15·2 answers
  • Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    6·1 answer
  • QUESTION 44 To determine whether a character entered is a letter of the alphabet, use the ________ function. isdigit fromkeyboar
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!