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
Gnesinka [82]
3 years ago
5

Write a program that reads in text from standard input (hint: use Scanner) and prints out the number of words in the text. For t

he purpose of this exercise, a word is a sequence of non-whitespace characters that is surrounded by whitespace.
Computers and Technology
1 answer:
Vitek1552 [10]3 years ago
4 0

Answer:

The solution code is written in Java

  1.        Scanner input = new Scanner(System.in);
  2.        System.out.print("Enter a text: ");
  3.        String inputStr = input.nextLine();
  4.        String wordList[] = inputStr.split(" ");
  5.        System.out.println("The number of word in the input text: " + wordList.length);

Explanation:

Firstly, create a Scanner object to read the user input text using nextLine method (Line 1-3).

Next, we can use the string split method and use single space " " as the separator to convert the input text to an array of individual word (Line 5).

We can simply use println to display the number of words in the array by using the length property of the array (Line 7). The word count is equal to the array length.  

You might be interested in
Can somebody please help me with these few questions?
Sophie [7]

Answer:

Felicia is using an ethernet cord which is making the wifi go extreme slow plus she still has the wifi on , on the computer while ethernet is in

Explanation:

Felicia is using an ethernet cord which is making the wifi go extreme slow plus she still has the wifi on , on the computer while ethernet is in

4 0
2 years ago
____________ is a widely accepted international best practices framework for implementing information systems security.
balandron [24]

Answer:

Control Objectives for Information and related Technology (COBIT)

Explanation:

COBIT is a framework developed by the ISACA for managing and supervising Information Technology processes. Such kinds of frameworks allow companies to position themselves with the expectations that they and their clients expect. COBIT's aim is to provide management and business process owners with an IT control and governance model that helps deliver value from IT and identify and handle the IT-related risks. It helps bridge the gap between business needs, control requirements and technical issues. It is a paradigm of control for addressing the IT governance requirements and maintaining the security of knowledge and information systems. COBIT emphasizes on what allows processes to work well.

8 0
3 years ago
Which features would work well for text entered into cells? Check all that apply.
yKpoI14uk [10]

Which features would work well for text entered into cells?

All the features given apply to text entered into a cell.

thesaurus , spelling , autosum , average , find , replace​

Explanation:

  • The tasks are referred to as basic tasks and include such operations as inserting and typing over, copying and moving items, finding and replacing text, undoing and redoing commands, checking spelling and grammar, using the thesaurus, and using formatting tools.
  • A thesaurus is used on a computer while writing an e-mail, letter, or paper to find an alternative meaning for words. For example, repeating the same word throughout your writing can become repetitive to a reader, and you could use a thesaurus to get a synonym of the word
  • Spelling is defined as the proper way to write a word, using the correct order of letters. This feature is provided by Excel for the cells.
  • AutoSum is a Microsoft Excel and other spreadsheet program function that adds together a range of cells and displays the total in the cell below the selected range.
  • The AVERAGE function calculates the average of numbers provided as arguments. To calculate the average, Excel adds the numbers together and divides by the total number of values supplied.
  • The
  • Microsoft Excel FIND function returns the location of a substring in a string. The search is case-sensitive. The FIND function is a built-in function in Excel that is categorized as a String/Text Function.
  • The Microsoft Excel REPLACE function replaces a sequence of characters in a string with another set of characters. The REPLACE function is a built-in function in Excel that is categorized as a String/Text Function. It can be used as a worksheet function (WS) in Excel.
4 0
4 years ago
Read 2 more answers
Select the correct answer from each drop-down menu
Lana71 [14]

Answer:

The purpose of the domain name is for credibility and location purposes.

Explanation:

For example.

nz.gov means that the domain owner is the government on New Zealend

8 0
3 years ago
The specific term for expediting the delivery of software by breaking a task into smaller increments is called
Ksivusya [100]
Rapid Application Development is the specific term
8 0
3 years ago
Other questions:
  • DJ wants to see how his document will look when printed. Where would he find the button to see the document in print view? the P
    5·2 answers
  • What were the goals of the “paperless society” ideal?
    14·2 answers
  • List 5 different programming languages calls to print
    8·2 answers
  • Write down the pseudo code of a program that calculates the Body Mass Index (BMI) of
    9·1 answer
  • What is a good way to minimize technical problems with your computer
    10·1 answer
  • What do you consider to be the next big thing in "Small Systems" (technology, hardware, software, etc.) and why?
    10·1 answer
  • Computer network reduces the cost of operation​
    14·1 answer
  • What legal protection would cover a person invention?
    10·2 answers
  • Indicate if the statement is true or false False 1. A spreadsheet cannot recalculate after you have changed data in your workshe
    15·1 answer
  • the image on the right was prooduced by a computer. it shows a complex molecu;e consisting of many atoms. what would be an advan
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!