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]
2 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]2 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
The programming interface between an application program and the dbms is usually provided by the
Inessa05 [86]
The Data Access API.
8 0
2 years ago
This is Very very Important to me[BRAINLIEST)✅​
sineoko [7]

Answer:

Rom

mellisa

Explanation:

pls mark me BRAINLIAST

4 0
2 years ago
Help me plz What character must always be used when a formula is enter in a cell? (on a spreadsheet)​
lara [203]

Answer:

The equal sign "=" must be used.

Most, if not all, spreadsheet programs support formulas, but you must start them with an equal sign.

8 0
2 years ago
In cell I5, enter a formula to calculate the total admission fees collected for the 2018
V125BC [204]
The formula is to calculate the total admission fees collected is = F5*B14

1. Click on cell I5
2. Type equal sign =
3. Type F5 or click on F5 cell
3. Type multiplication sign *
4. Type B14 or click on B14 cell
4 0
3 years ago
Read 2 more answers
true or false, the random number generator (data analysis tool) requires you to copy paste special value in order to create stat
Vladimir79 [104]

The random number generator (data analysis tool) requires you to copy paste special value in order to create static random value(s) is a false statement.

<h3>What is the meaning of random number?</h3>

A random number is a pick of a number made seemingly at random from a certain distribution such that the distribution is reproduced when a large collection of these numbers is chosen. Such numbers must almost always be independent in order to prevent relationships between succeeding numbers.

Therefore, a hardware or software algorithm known as a random number generator produces numbers at random from a finite or infinite distribution. Pseudo-random number generators and real random number generators are the two primary varieties of random number generators.

Learn more about random number generator from

brainly.com/question/10352102
#SPJ1

8 0
9 months ago
Other questions:
  • Into which of these files would you paste copied information to create an integrated document?
    13·2 answers
  • Which routine best ensures email safety?
    7·2 answers
  • What is the name used for the integrated program development environment that comes with a Python installation?
    5·1 answer
  • Put these steps for managing your study time in chronological order. 1 set aside the same time each day 2 Identify the best time
    14·1 answer
  • I prefer a job where I am praise for good performance or I am accountable for results
    13·1 answer
  • 100 tickets are sold in a raffle with one prize. John has 8 tickets, Jamie has 10 tickets, find the probability that John wins
    11·2 answers
  • Suppose testcircle1 and circle1 in listing 9.1 are in two separate files named testcircle1.java and circle1.java, respectively.
    14·1 answer
  • A type of multiprocessor chip that provides two or more separate and independent CPUs.
    8·1 answer
  • Instructions
    8·1 answer
  • How do I fix when it hits the second session it skips scanf.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!