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
In Lab 7, we worked through a program that displayed the homeless shelter occupancy over time. The same approach can be used for
Bezzdna [24]

Answer:

Explanation:

The python code to generate this is quite simple to run.

i hope you understand everything written here, you can as well try out other problems to understand better.

First to begin, we import the package;

Code:

import pandas as pd

import matplotlib.pyplot as plt

name = input('Enter name of the file: ')

op = input('Enter name of output file: ')

df = pd.read_csv(name)

df['Date'] = pd.to_datetime(df["Date"].apply(str))

plt.plot(df['Date'],df['Absent']/(df['Present']+df['Absent']+df['Released']),label="% Absent")

plt.legend(loc="upper right")

plt.xticks(rotation=20)

plt.savefig(op)

plt.show()

This should generate the data(plot) as seen in the uploaded screenshot.

thanks i hope this helps!!!

6 0
2 years ago
A rectangular steel bar, with 8" x 0.75" cross-sectional dimensions, has equal and opposite moments applied to its ends.
denpristay [2]

Answer:

Part a: The yield moment is 400 k.in.

Part b: The strain is 8.621 \times 10^{-4} in/in

Part c: The plastic moment is 600 ksi.

Explanation:

Part a:

As per bending equation

\frac{M}{I}=\frac{F}{y}

Here

  • M is the moment which is to be calculated
  • I is the moment of inertia given as

                         I=\frac{bd^3}{12}

Here

  • b is the breath given as 0.75"
  • d is the depth which is given as 8"

                     I=\frac{bd^3}{12}\\I=\frac{0.75\times 8^3}{12}\\I=32 in^4

  • y is given as

                     y=\frac{d}{2}\\y=\frac{8}{2}\\y=4"\\

  • Force is 50 ksi

\frac{M_y}{I}=\frac{F_y}{y}\\M_y=\frac{F_y}{y}{I}\\M_y=\frac{50}{4}{32}\\M_y=400 k. in

The yield moment is 400 k.in.

Part b:

The strain is given as

Strain=\frac{Stress}{Elastic Modulus}

The stress at the station 2" down from the top is estimated by ratio of triangles as

                        F_{2"}=\frac{F_y}{y}\times 2"\\F_{2"}=\frac{50 ksi}{4"}\times 2"\\F_{2"}=25 ksi

Now the steel has the elastic modulus of E=29000 ksi

Strain=\frac{Stress}{Elastic Modulus}\\Strain=\frac{F_{2"}}{E}\\Strain=\frac{25}{29000}\\Strain=8.621 \times 10^{-4} in/in

So the strain is 8.621 \times 10^{-4} in/in

Part c:

For a rectangular shape the shape factor is given as 1.5.

Now the plastic moment is given as

shape\, factor=\frac{Plastic\, Moment}{Yield\, Moment}\\{Plastic\, Moment}=shape\, factor\times {Yield\, Moment}\\{Plastic\, Moment}=1.5\times400 ksi\\{Plastic\, Moment}=600 ksi

The plastic moment is 600 ksi.

3 0
3 years ago
Appliances that use force voltage analogy
Inga [223]
Answer: resistor

Explanation: Not quite sure. Need more research
5 0
2 years ago
This is just so I can flip the picture
Pepsi [2]

Answer:

ok

Explanation:

thx for points

7 0
3 years ago
A geothermal pump is used to pump brine whose density is 1050 kg/m3 at a rate of 0.3 m3/s from a depth of 200 m. For a pump effi
nasty-shy [4]

Answer:

Input power of the geothermal power will be 686000 J

Explanation:

We have given density of brine \rho =1050kg/m^3

Rate at which brine is pumped V=0.3m^3/sec

So mass of the pumped per second

Mass = volume × density = 1050\times 0.3=315 kg/sec

Acceleration due to gravity g=9.8m/sec^2

Depth h = 200 m

So work done W=mgh=315\times 9.8\times 200=617400J

Efficiency is given \eta =0.9

We have to fond the input power

So input power =\frac{617400}{0.9}=686000J

So input power of the geothermal power will be 686000 J

5 0
3 years ago
Other questions:
  • For the SR-latch below high levels of Set and Reset result in Q= 1 and 0, respectively. The next state is unknown when both inpu
    12·1 answer
  • System grounding on a power system means electrically connecting the __?__ of every wye-connected transformer or generator to ea
    12·1 answer
  • What is the stress concentration factor of a shaft in torsion, where D=1.25 in. and d=1 in. and the fillet radius is, r=0.2 in.a
    7·1 answer
  • Two variables, num_boys and num_girls, hold the number of boys and girls that have registered for an elementary school. The vari
    8·1 answer
  • What fraction of the worlds surface is estimated to be arable land?
    15·1 answer
  • Calculate the number of vacancies per cubic meter for some metal, M, at 749°C. The energy for vacancy formation is 0.86 eV/atom,
    5·1 answer
  • 7. Sockets internal designs come in what sizes?
    5·1 answer
  • The coolant heat storage system:
    10·1 answer
  • Everyone has only one learning style. True or false? hurry pleasle this exp carees class
    11·1 answer
  • Which type of system is being researched to deliver power to several motors to drive multiple systems in vehicles?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!