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
Fast plz-The mirror check may involve ______________.
barxatty [35]

Answer:

Realigning the mirror

Explanation:

mirrors should be aligned to minimize blind spots, not look at the tires.

6 0
3 years ago
An aircraft is flying at 300 mph true airspeed has a 50 mph tailwind. What is its ground speed?
Free_Kalibri [48]

Answer:

304.13 mph

Explanation:

Data provided in the question :

The Speed of the flying aircraft = 300 mph

Tailwind of the true airspeed = 50 mph

Now,

The ground speed will be calculated as:

ground speed = \sqrt{300^2+50^2}

or

The ground speed = \sqrt{92500}

or

The ground speed = 304.13 mph

Hence, the ground speed is 304.13 mph

8 0
4 years ago
Whose job is it to ensure that a group stays focused and on schedule?
Sedbober [7]

Answer:

the leader or organizer. you should have assigned jobs, so one of them should be in charge. if you did not assign jobs, assign them now, and one person has a job, and they must be held accountable. if they cannot do their job, someone might have to take over, but then you tell your prof. that they could not do their part, so hopefully you will get the credit you deserve and they will not.

Explanation:

3 0
3 years ago
Read 2 more answers
If the price of the car is less than or equal to your available cash, display "no". If the price of the car is more than your av
Ede4ka [16]

Answer:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

Explanation:

using functions in Javascript:

functions; this refers to dividing codes into reusable parts.

e.g function function_name() {

console.log("How are you?");

}

you can call or invoke this function by using its name followed by parenthesis, like this: function_name(). each time the function is called it will   print out "How are you?".

Parameters: these are variables that act as placeholders for the values that are to be input into a function when it is called

Arguments: The actual values that input or passed into a function when it is called.

e.g

function function_name(parameter1, parameter2) {

console.log(parameter1, parameter2);

}

then we call function_name: function_name("please", "leave"):we have passed two arguments, "please"  and "leave". Inside the function parameter1 equals "please" while parameter2 equals "leave".

Hence, from the question given the two parameters "car_price" and "available_cash" respectively, we write the function with name function_name:

function decision(car_price, available_cash) {

   if(car_price <= available_cash) {

   console.log("no");

   }

   else  {

   console.log("yes");

   }

   }

decision(car_price, available_cash); or decision(available_cash, car_price);

7 0
3 years ago
Which of these are not included as part of a drivetrain
Zielflug [23.3K]

Answer:

transmission, driveshafts, differential and axles

Explanation:

The powertrain consists of the prime mover (e.g. an internal combustion engine and/or one or more traction motors) and the drivetrain - all of the components that convert the prime mover's power into movement of the vehicle (e.g. the transmission, driveshafts, differential and axles); whereas the drivetrain does not.

7 0
3 years ago
Other questions:
  • Our goal is to design a traffic-light controller with the following properties; it lights up the green light (output G) for 15 s
    7·1 answer
  • A brittle intermetallics specimen is tested with a bending test. The specimen's width 0.45 in and thickness 0.20 in. The length
    5·1 answer
  • 1. What is an op-amp? List the characteristics of an ideal op-amp
    11·1 answer
  • A 10-mm-diameter Brinell hardness indenter produced an indentation 2.50 mm in diameter in a steel alloy when a load of 1000 kg w
    12·1 answer
  • Which of the following are made up of electrical probes and connectors?
    8·1 answer
  • Which is the maximum length for any opening on the surface of a 2G SMAW guided bend test specimen?
    11·1 answer
  • Which of the following is an example of a computer simulation?
    7·1 answer
  • 3. How can statistical analysis of a dataset inform a design process?<br> PLEASE I NEED THIS ANSWER
    8·1 answer
  • The minimum recommended standards for the operating system, processor, primary memory (RAM), and storage capacity for certain so
    12·2 answers
  • The three construction crafts that require a MINIMUM of a 4-year college degree are
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!