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
your manager asked you to set up a secure network connection at a remote site to move over some back ups. what protocol what do
Ivan

The protocol that should be used to establish a secure network connection for backups is SSH.

<h3>Secure Shell</h3>

SSH stands for <u>Secure Shell</u>. SSH is a <u>protocol that allows users to remotely control and modify servers</u>. SSH is commonly used by administrators to manage certain systems or applications remotely. So the admin can enter the computer via the network, then run various commands to modify or manage files from one computer to another.

SSH has several crucial functions for managing data transfer traffic. Specifically, the following are the functions and benefits of SSH:

  • Securing remote access to SSH-enabled systems or network devices for the user and processing them automatically.
  • SSH will automatically terminate the connection if there is suspicious activity on the connection used. So you can avoid various cyber threats such as IP and DNS spoofing, data manipulation, illegal tracking, and others.
  • Perform automatic and secure file transfers.
  • Launch commands securely on remote devices or systems.
  • Perform secure component management of network infrastructure.

Learn more about Secure network connection: brainly.com/question/28083478

#SPJ4

8 0
1 year ago
Create a function named first_a that uses a list comprehension. The function will take a single integer parameter n. Find every
aivan3 [116]

Answer:

def first_a(n):

   lst1 =[x for x in range(1,n+1)if x%6==0 or x%11 ==0]

   print(lst1)

Explanation:

Above is a function in python programming language. We have used list comprehension to check numbers that are multiples of 6 or 11 in a range.

When this function is called it will receive an argument (n) of type integer, a range will then be generated from 1 to n+1 since n is inclusive. The modulo operator is used to determine is a value is a multiple of 6 or 11, since their multiples will evaluate to 0

3 0
3 years ago
Images from your .............. can be copied and pasted in a folder on your computer ​
Alenkasestr [34]

I think the answer is document

7 0
3 years ago
According to Newton's Second Law of Motion, when an object is acted on by an unbalanced force, how will that object respond?
Murrr4er [49]
A. It will decrease speed
5 0
3 years ago
Which software is used to play, create, and modify audio and video files?
Alenkasestr [34]
Windows Movie Maker, iMovie, Final Cut Pro (x), QuickTime?
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of the following are examples of algorithms? (Select all that apply, if any do.)
    15·2 answers
  • Write a function called calculate() that accepts three integer Numbers as arguments, compute these values : Sum and Product and
    7·1 answer
  • These are questions from my Computer/Customer Support Class
    6·1 answer
  • Im being timed please help!!
    7·2 answers
  • ________ programming is a method of writing software that centers on the actions that take place in a program.
    8·1 answer
  • Please create C program, the task is to implement a function edoublepowerx that has an input parameter x of floating-point value
    11·1 answer
  • Linda wants to apply for a job in a company of her choice. Which information would her potential employers likely review in her
    10·2 answers
  • When using the Common Internet File System (CIFS), which security model does not require a password to be set for the file share
    7·1 answer
  • Both aliases and functions can be used to store commands that can be executed, but functions can also accept positional paramete
    14·1 answer
  • he degree of operating leverage is equal to: Group of answer choices FC / OCF. VC / OCF. 1 FC / OCF. 1 VC / OCF. 1 Picture FC /
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!