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 booting as used in computers?​
Sliva [168]

Answer:

the startup process

Explanation:

5 0
3 years ago
Read 2 more answers
Give 15 examples of copyright and trademarks that we come in contact with everyday. (Doesn't hve to be 15 could be 3 or 5) PLEAS
oksano4ka [1.4K]
Roads, trading, Government, water systems,
6 0
3 years ago
You are building a network and need to connect five computers in an office. They will be on the same network segment and you sho
lilavasa [31]

Answer:

a lan party

Explanation:

because it's your personal party

4 0
3 years ago
Which of the following best describes the displayport interface used for connecting video monitors to computers
Lesechka [4]

Answer:

Displayport uses a lower voltage than DVI and HDMI.

Explanation:

DisplayPort are cables and connector used to stream video, audio, usb or other kinds of data to the monitor screen of a computer. As defined, it can send video and audio signals on the same cable, over a long distance at a high speed.

The voltage requirement for DisplayPort is 3.3 volts while HDMI and DVI uses 5 volts.

3 0
3 years ago
Connection-oriented protocols protect against dropped data by forming connections and using what type of constant stream?
nataly862011 [7]

Answer:

A real constany

Explanation:

5 0
3 years ago
Other questions:
  • The amount of interest you will earn in one year from a savings account is the _____. A) APY B) return C) IDA D) CD
    12·2 answers
  • Common icons found on the Windows desktop are _____.
    6·2 answers
  • Can someone pls explain this question??
    7·1 answer
  • PLEASE HELP!
    13·2 answers
  • A5.3 1012 kg satellite is 1,800 m from another satellite that has a mass of 3.5 x 108 kg. What is the gravitational
    6·1 answer
  • What information medium is used to access information from the Internet in the form of HTML pages?
    12·1 answer
  • It is a small hand tool used generally in decorative works such as making garnishes
    15·1 answer
  • The radix sort
    7·1 answer
  • First person to make me laugh will get brainliest.​
    10·2 answers
  • Help me with thissssss
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!