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
Anvisha [2.4K]
3 years ago
5

You recall an algorithm from elementary school for factoring a number N: Divide out all factors of 2, then of 3, then of 4, then

of 5, then of 6, then of 7, etc. Finally, divide out all factors of N (of which there can be at most one). (a) Write pseudo-code for this algorithm (and print the prime factors)
Engineering
1 answer:
Contact [7]3 years ago
4 0

Answer:

let number = 0

while number < 1

  begin

     print "Enter a positive integer: "

     read number

  end

end_while

find and print number's factors:

let prime = TRUE

let currentFactor = 2

let lastFactor = the square root of number truncated

  to an integer value

while currentFactor <= lastFactor

  begin

     if number is evenly divisible by currentFactor

        begin

           print currentFactor

           let number = number / currentFactor

        end

     else

        let currentFactor = currentFactor + 1

     end_if

  end

end_while

print a message if number is prime:

if prime == TRUE

  print "Your number is prime"

end_if

Explanation:

You might be interested in
Which of the following is NOT a provision of the Agricultural Adjustment Act? insurance for farmers alternative energy programs
Arisa [49]

Answer:

Farm equipment

Explanation:

Most people have heard claims that the US government pays farmers not to grow crops. The Agricultural Adjustment Act is the legislation that started this program. It was the first “Farm Bill.” The current farm bill provides for the following:

Subsidies for farmers

Insurance for farmers

Price supports

Food assistance for economically challenged Americans (the largest portion of the Farm Bill)

Forestry conservation programs

Alternative energy programs.

4 0
2 years ago
Determine the period of each of the following discrete-time signals (if a signal is not periodic, denote its period by infinity)
sergiy2304 [10]

Answer:

a) it is periodic

N = (20/3)k = 20 { for K =3}

b) it is Non-Periodic.

N = ∞

c) x(n) is periodic

N = LCM ( 5, 20 )

Explanation:

We know that In Discrete time system, complex exponentials and sinusoidal signals are periodic only when ( 2π/w₀) ratio is a rational number.

then the period of the signal is given as

N = ( 2π/w₀)K

k is least integer for which N is also integer

Now, if x(n) = x1(n) + x2(n) and if x1(n) and x2(n) are periodic then x(n) will also be periodic; given N = LCM of N1 and N2

now

a) cos(2π(0.15)n)

w₀ = 2π(0.15)

Now, 2π/w₀ = 2π/2π(0.15) = 1/(0.15) = 1×20 / ( 0.15×20) = 20/3

so, it is periodic

N = (20/3)k = 20 { for K =3}

b) cos(2n);

w₀ = 2

Now, 2π/w₀ = 2π/2) = π

so, it is Non-Periodic.

N = ∞

c)  cos(π0.3n) + cos(π0.4n)

x(n) = x1(n) + x2(n)

x1(n) = cos(π0.3n)

x2(n) =  cos(π0.4n)

so

w₀ = π0.3

2π/w₀  = 2π/π0.3 = 2/0.3 = ( 2×10)/(0.3×10) = 20/3

∴ N1 = 20

AND

w₀ = π0.4

2π/w₀  = 2π/π0. = 2/0.4 = ( 2×10)/(0.4×10) = 20/4 = 5

∴ N² = 5

so, x(n) is periodic

N = LCM ( 5, 20 )

6 0
2 years ago
If the maximum allowable shear stress is 70 MPa, find the shaft diameter needed to transmit 40 kW when the shaft speed is 250 rp
victus00 [196]

Answer:

The diameter is 50mm

Explanation:

The answer is in two stages. At first the torque (or twisting moment) acting on the shaft and needed to transmit the power needs to be calculated. Then the diameter of the shaft can be obtained using another equation that involves the torque obtained above.

T=(P×60)/(2×pi×N)

T is the Torque

P is the the power to be transmitted by the shaft; 40kW or 40×10³W

pi=3.142

N is the speed of the shaft; 250rpm

T=(40×10³×60)/(2×3.142×250)

T=1527.689Nm

Diameter of a shaft can be obtained from the formula

T=(pi × SS ×d³)/16

Where

SS is the allowable shear stress; 70MPa or 70×10⁶Pa

d is the diameter of the shaft

Making d the subject of the formula

d= cubroot[(T×16)/(pi×SS)]

d=cubroot[(1527.689×16)/(3.142×70×10⁶)]

d=0.04808m or 48.1mm approx 50mm

7 0
3 years ago
Steam flowing through a long, thin walled pipe maintains the pipe wall at a uniform temperature of 500 K. The pipe is covered wi
hjlf

Answer: I would love to learn this

Explanation:

3 0
2 years ago
A plate (A-C) is connected to steelflat bars by pinsat A and B. Member A-E consists of two 6mm by 25mm parallel flat bars. At C,
juin [17]

Answer:

stress_ac = 5.333 MPa

shear stress_c = 1.763 MPa

Explanation:

Given:

- The missing figure is in the attachment.

- The dimensions of member AC = ( 6 x 25 ) mm x 2

- The diameter of the pin d = 19 mm

- Load at point A is P = 2 kN

Find:

-  Find the axial stress in AE and the shear stress in pin C.

Solution:

- The stress in member AE can be calculated using component of force P along the member AE  as follows:

                                    stress_ac = P*cos(Q) / A_ae

Where, Angle Q: A_E_B   and A_ac: cross sectional area of member AE.

                                    cos(Q) = 4 / 5   ..... From figure ( trigonometry )

                                    A_ae = 0.006*0.025*2 = 3*10^-4 m^2

Hence,

                                    stress_ae = 2*(4/5) / 3*10^-4

                                    stress_ae = 5.333 MPa

- The force at pin C can be evaluated by taking moments about C equal zero:

                                   (M)_c = P*6 - F_eb*3

                                      0 = P*6 - F_eb*3

                                      F_eb = 0.5*P

- Sum of horizontal forces for member AC is zero:

                                      P - F_eb - F_c = 0

                                      F_c = 0.5*P

- The shear stress of double shear bolt is given by an expression:

                                     shear stress = shear force / 2*A_pin

Where, The area of the pin C is:

                                     A_pin = pi*d^2 / 4

                                     A_pin = pi*0.019^2 / 4 = 2.8353*10^-4 m^2

Hence,

                                     shear stress = 0.5*P / 2*A_pin

                                     shear stress = 0.5*2 / 2*2.8353*10^-4

                                    shear stress = 1.763 MPa

7 0
3 years ago
Other questions:
  • Indicates the design of the building and<br> adjoining areas
    12·1 answer
  • A 600-MW steam power plant, which is cooled by a nearby river, has a thermal efficiency of 40 percent. Determine the rate of hea
    10·2 answers
  • What is something that a robot or computer program might do that requires a decision, or conditional statement?
    9·1 answer
  • What i s the value of a capacitor with 250 V applied and has 500 pC of charge? (a) 200 uF (b) 0.5 pF (c) 500 uF (d) 2 pF
    15·1 answer
  • the frequencies 10, 12, 23 and 45 Hz. (a) What is the minimum sampling rate required to avoid aliasing? (b) If you sample at 40
    13·1 answer
  • Fibonacci sequence has many applications in Computer Science. Write a program to generate Fibonacci numbers as many as desired.
    9·2 answers
  • Maintain a distance of at least
    12·2 answers
  • (1) Estimate the specific volume in cm3 /g for carbon dioxide at 310 K and (a) 8 bar (b) 75 bar by the virial equation and compa
    10·1 answer
  • using the following data for july, calculate the cost of goods manufactured: beginning finished goods inventory 150,475. Ending
    5·1 answer
  • The static weight distribution is changed laterally by
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!