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
Develop the truth table for each of the combinational logic circuits
Fudgin [204]

Answer:

ang haba po grabe hahahhaahhahahahahah

Explanation:

pabrainlest po t.y

3 0
2 years ago
You work as the IT administrator for a small business and are responsible for the corporate network. Until now, the network has
posledela

Answer:

Extend a Volume:

1. in the lower left-hand corner, R click the start page thumbnail and select disk management

2. if needed, click ok to initialize any new disks.

3. R click the volume and select extend volume.

4. click next.

5. for the system volume, you can only extend the volume onto the existing disk. type the amount of disk space to add to the volume and click next. click finish.

Convert a Disk to Dynamic

1. In Disk management, R click the disk and select convert to Dynamic Disk

2. Select the disk to convert, click ok.

3. Click convert

4. If the disk contains a volume, you will be shown a warning message. Click Yes to continue.

Create a Spanned Volume

1. In disk management, R click a disk or free space on a disk and select New Spanned Volume.

2. Click Next

3. Select the disks that will be part of the spanned volume and click Add. You must select at least 2 disks to create a spanned volume.

4. To modify the amount of space used on a disk for the new volume, select the disk in the right box, and then edit the number in the select the amount of space in MB: field.

5. Click next

6. Select the drive letter and click Next

7. Type the volume label, then click next

8. Click finish

9. If the new volume includes a space from a disk that is currently a basic disk, you will be prompted to convert the disk to a dynamic disk. Click Yes to create the volume.

Explanation:

5 0
2 years ago
What are two reasons for using layered protocols? what is one possible disadvantage of using layered protocols?
Ostrovityanka [42]
Some of the disadvantages of using layered protocols are the redundancy and overall lower performance.
Reimplementing everything from remote and wired to connectionless and association situated application correspondence, with each ringer and shriek of BGP, MPLS, multicast steering and so on would be a gigantic endeavor and potentially unmanageable in this solid across the board convention. I could envision specialty utilize situations where most extreme execution is imperative most importantly where an exceptionally basic framework might be wanted.
8 0
2 years ago
1. Name a two methods for creating text in Adobe Illustrator.
Fittoniya [83]

Answer:

Point type is a horizontal or vertical line of text that begins where you click and expands as you enter characters. Each line of text is independent—the line expands or shrinks as you edit it, but doesn’t wrap to the next line. Entering text this way is useful for adding a few words to your artwork.

Select the Type tool  or the Vertical Type tool .

The pointer changes to an I-beam within a dotted box. The small horizontal line near the bottom of the I-beam marks the position of the baseline, on which the text rests.

(Optional) Set text-formatting options in the Control panel, Character panel, or Paragraph panel.

Click where you want the line of text to begin.

Explanation:

4 0
3 years ago
Having a low credit score can make it more difficult to: Obtain a car loan Open a new credit card Secure an apartment lease All
-Dominant- [34]

Answer:

all of the above

Explanation:

3 0
3 years ago
Other questions:
  • Row array gameScores contains all player scores. Construct a row array highScores than contains all player scores greater than m
    15·1 answer
  • A compound document contains _______ from different applications.
    12·2 answers
  • Information permanently stored on a hard disk, diskette, cd-rom disk, or tape, is called ________ storage.
    8·1 answer
  • The multitasking, multi-user, operating system developed by Bell Laboratories that operates on a wide variety of computing platf
    13·1 answer
  • I need help, whoever gets it correct will get brainliest
    7·1 answer
  • Calculate the number of telephone
    5·1 answer
  • Mention two strategies of collecting data​
    13·1 answer
  • Who is the best basketball player ever... if you do not say lebron do not comment
    5·1 answer
  • Each student has a record on a file consisting of the following data: Student last name, Student ID (numeric), GPA (a decimal nu
    7·1 answer
  • In order to prevent ports that are serving network hosts from being considered as best paths, what should be enabled to block bp
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!