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
sineoko [7]
3 years ago
13

Write the definition of a function named count that reads all the strings remaining to be read in standard input and returns the

ir count (that is, how many there are) So if the input was:
hooligan sausage economy
ruin palatial
the function would return 5 because there are 5 strings there.
Computers and Technology
1 answer:
spayn [35]3 years ago
8 0

Answer:

The function written in C++

int str(string word) {

int count = 1;

for(int i =0; i<word.length();i++) {

 if(word[i] == ' ') {

  count++;

 }

}

return count;

}

Explanation:

This line defines the function

int str(string word) {

This line initializes count to 1

int count = 1;

This line iterates through the input string

for(int i =0; i<word.length();i++) {

This line checks for blank space

 if(word[i] == ' ') {

Variable count is incremented to indicate a word count

  count++;

 }

}

return count;

}

<em>See attachment for full program</em>

Download cpp
You might be interested in
Range of motion definition
svet-max [94.6K]
Range of Motion:
Range of Motion or ROM is an exercise machine when a person has been injured in some way, most times the doctor's advises the patients to exercise and stretch the back back muscles. 
<span />
7 0
3 years ago
In the event that a software product fails within a predetermined. Clients use a​
Musya8 [376]

Answer:

try to update product software it will working

Explanation:add license product of a software

5 0
4 years ago
Which of the following statements applies to a proprietary software license? a. Purchased from a vendor and gives you the right
Semmy [17]

Answer: a)Purchased from a vendor and gives you the right to use the software but is not yours to own.

Explanation: Proprietary software is the software that can be used by the user but it has  copyright of the vendor/holder in any case.There are some certain condition under which the user can use this software.The distribution of the software is not permitted in this case. No modification or manipulation can be done by the user.

Other options are incorrect because it is not free as its purchased from vendor ,not freely available rather guided by owner and can be used over certain period of time.Thus , the correct option is option(a).

3 0
3 years ago
State three positive uses of the computer in the government sector​
WINSTONCH [101]

Well Here I got 4

1. Email Functions

2. Distributing Payments

3. Record Keeping

4. Direct Mail Promotions

<em>Have A great night!</em>

<em></em>

6 0
4 years ago
When installing EMT conduit that will be exposed to wet conditions, _______ fittings should be used.
Tasya [4]
Its a compression type fitting PENN FOS TEST
5 0
3 years ago
Other questions:
  • A(n) _____ can be used to convert digitized documents into ascii (american standard code for information interchange) text that
    6·1 answer
  • ______ is the software that blocks a user from being able to access your computer.
    9·1 answer
  • Which version of Windows was considered an operating environment rather than an operating system? Windows 1.0 Windows 3.0 Window
    9·1 answer
  • Which payment type is best if you are trying to stick to a budget?
    6·1 answer
  • Name the part of windows<br> explore window​
    7·2 answers
  • Imagine that you have access to a class named MyCircle that has void setRadius(double r) and double getRadius() methods. Write a
    14·1 answer
  • you crossed two heterozygous red flowers (dominant color), what are your chances to have a white flower
    11·1 answer
  • From the pictures below select 5 words that best describes quality and briefly discuss it in not more than 3 sentences
    6·1 answer
  • Another word for Arithmetic Logic Unit​
    6·1 answer
  • What is the dark web and what is the .onion domain
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!