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
Olenka [21]
3 years ago
10

Fill in the empty function so that it returns the sum of all the divisors of a number, without including it. A divisor is a numb

er that divides into another without a remainder.
Engineering
1 answer:
tekilochka [14]3 years ago
6 0

Answer:

// Program is written in C++

// Comments are used to explain some lines

// Only the required function is written. The main method is excluded.

#include<bits/stdc++.h>

#include<iostream>

using namespace std;

int divSum(int num)

{

// The next line declares the final result of summation of divisors. The variable declared is also

//initialised to 0

int result = 0;

// find all numbers which divide 'num'

for (int i=2; i<=(num/2); i++)

{

// if 'i' is divisor of 'num'

if (num%i==0)

{

if (i==(num/i))

result += i; //add divisor to result

else

result += (i + num/i); //add divisor to result

}

}

cout<<result+1;

}

You might be interested in
What should be your strongest tool be for gulding your ethical decisions making process
valkas [14]

Answer:

Recognize that there is a moral dilemma.

Determine the actor. ...

Gather the relevant facts. ...

Test for right versus wrong issues. ...

Test for right versus right paradigms. ...

Apply the resolution principles. ...

Investigate the trilemma options. ...

Make the decision.

7 0
2 years ago
The question belongs to Electrical Engineering (Linear System).
-Dominant- [34]
I’m crying looking at that.
5 0
3 years ago
Discuss the differences between conduction and convective heat transfer.
FrozenT [24]

Answer:

Basically there are two principal differences between the convection and conduction heat transfer

Explanation:

The conduction heat transfer is referred to the transfer between two solids due a temperature difference, while for, the convective heat transfer is referred to the transfer between a fluid (liquid or gas) and a solid. Also, they used different coefficients for its calculation.

We can include on the explanation that conduction thermal transfer is due to temperature difference, while convection thermal transfer is due to density difference.

8 0
3 years ago
Define the word vision statement​
Elena L [17]

Answer:

A vision statement describes what a company desires to achieve in the long-run, generally in a time frame of five to ten years, or sometimes even longer. It depicts a vision of what the company will look like in the future and sets a defined direction for the planning and execution of corporate-level strategies.

Explanation:

While companies should not be too ambitious in defining their long-term goals, it is critical to set a bigger and further target in a vision statement that communicates a company’s aspirations and motivates the audience. Below are the main elements of an effective vision statement:

-Forward-looking

-Motivating and inspirational

-Reflective of a company’s culture and core values

-Aimed at bringing benefits and improvements to the organization in the future

-Defines a company’s reason for existence and where it is heading

7 0
3 years ago
Why are funeral home adding dining facilities to the business
Gelneren [198K]
Because they think it will make them more money
5 0
2 years ago
Other questions:
  • The aluminum rod AB (G 5 27 GPa) is bonded to the brass rod BD (G 5 39 GPa). Knowing that portion CD of the brass rod is hollow
    14·1 answer
  • A well-insulated tank in a vapor power plant operates at steady state. Saturated liquid water enters at inlet 1 at a rate of 125
    6·2 answers
  • Carbon dioxide flows at a rate of 1.5 ft3 /s from a 3-in. pipe in which the pressure and temperature are 20 psi (gage) and 120 °
    8·1 answer
  • Which type of irrigation conserves more water than other types of irrigation?
    8·1 answer
  • The unit weight of a soil is 14.9kN/m3. The moisture content of the soil is17% when the degree of saturation is 60%. Determine:
    15·1 answer
  • Technician A says that 18 gauge AWG wire can carry more current flow that 12 gauge AWG wire. Technician B says that metric wire
    9·1 answer
  • Consider a potato being baked in an oven that is maintained at a constant temperature. the temperature of the potato is observed
    14·1 answer
  • ?Why the efficiency of Class A amplifier is very poor​
    11·1 answer
  • 28. What is the value of a resistor in a series circuit if you measure 0.5 amps flowing through it and 15 volts
    10·1 answer
  • If a fuel line is routed through a compartment parallel with an electrical wire bundle, the fuel line should be installed ______
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!