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
KATRIN_1 [288]
2 years ago
6

Define a function Output Value() that takes two integer parameters and outputs the sum of all negative integers starting with th

e first and ending with the second parameter. If no negative integers exist, sum is 0. End with a newline. The function does not return any value. Ex: If the input is -7 1, then the output is: -28 Note: Negative numbers are less than 0.
Computers and Technology
1 answer:
hoa [83]2 years ago
4 0

The function is written in C++ programming language and is be displayed below:

long OutputVal(int start, int end) {

 long result = 1;

 for (int num = start; num <= end; num++) {

   result *= num;

 }

 return result;

}

The program defines a function Output Value(), takes two integer parameters, and outputs the sum of all negative integers starting with the first and ending with the second parameter.

Read more about C++ here:

brainly.com/question/20339175

#SPJ1

You might be interested in
When are numbered lists generally used?
laiz [17]
<span>C. when listing items that have an order of priority </span>
4 0
3 years ago
Read 2 more answers
What operating system are you using? On most computers, you can answer this question by right-clicking on the "My Computer" icon
Viktor [21]

Explanation:

hbbbbhygjjjjkllkkjhkkky

5 0
3 years ago
Read 2 more answers
Given: an int variable k, an int array current Members that has been declared and initialized, an int variable memberID that has
Alekssandra [29.7K]

Answer:

The c++ program is given below. Nothing is displayed as per the question.

#include <iostream>

using namespace std;

int main() {    

   // declaration and initialization of integer variables

   int k, memberID = 12, nMembers=5;

   bool isAMember;    

   // declaration and initialization of integer array

   int currentMembers[] = {12, 34, 56, 78, 90};    

   for(k=0; k<nMembers; k++)

   {

       if(memberID == currentMembers[k])

       {

           // when member is found in the array, the loop is exited using break

           isAMember = true;

           break;

       }

       else

           isAMember = false;

   }    

   return 0;

}

Explanation:

The program begins with declaration and initialization of integer variables and followed by initialization of the array holding the id of all the members.

The Boolean variable is declared but not initialized.

int k, memberID = 12, nMembers=5;

bool isAMember;

int currentMembers[] = {12, 34, 56, 78, 90};

After this, the array holding the id of the members is searched for the given member id. This is done using  a for loop and a if else statement inside the loop.

If the member id is present in the array, the variable isAMember is initialized to true otherwise it is assigned false.

When the variable isAMember is initialized to true, the break statement is used to exit from the loop.

for(k=0; k<nMembers; k++)

   {

       if(memberID == currentMembers[k])

       {

           isAMember = true;

           break;

       }

       else

           isAMember = false;

 }

The break is used since other values of id in the array will not match the given member id and the variable, isAMember will be initialized to false even if the given member id is present in the array. Hence, it is mandatory to exit the loop once the given member id is found in the array.

This program can be tested for different values of the id of the members and different sizes of the array.

4 0
4 years ago
Personal computer hard disk platters typically have storage capacities ranging from 40 gb to ____.
Doss [256]
2tb I think I'm not that sure
7 0
3 years ago
Where should a "deny all catch all" rule be positioned and why?<br> pleaseeee help!
insens350 [35]

Answer: For best performance and lowest latency, the MMU and CPU should support hardware ... broadcast, and subnet broadcast traffic with the deny-all catch-all filter rule for ... Please refer to the NetSight Wireless Manager User Guide (v5.1 or higher ) for a ... The rule must also be positioned above the 'Deny All' Default action.

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • You are tasked with securing a small network for a client in which the following requirements must be met: If a user on the priv
    8·1 answer
  • Which of the following characters at the beginning of a cell signifies to Excel that it should perform a calculation for the val
    13·1 answer
  • Design a module named getNumber, which uses a reference parameter variable to accept an Integer argument. The module should prom
    6·1 answer
  • Priscilla is providing the junior analysts in her firm with some real-world illustrations to explain some of the recommendations
    12·1 answer
  • You are the leader of a team at work. What type of leader would you like to be – one that gets involved and works with the team
    15·2 answers
  • What is a ribbon in word
    15·2 answers
  • The model for Diminishing Marginal Utility is ______ in nature.
    12·1 answer
  • Detecta 1 problema
    5·2 answers
  • Priortization is an example of a skill that helps you reach long term goals because
    14·1 answer
  • Which command os used to find a particular word in a document ?<br>​
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!