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
Please help is due tonight
Kipish [7]

Answer:

tHE answer is b

Explanation:

7 0
3 years ago
Read 2 more answers
Write a statement that calls the recursive method backwardsAlphabet() with parameter startingLetter.
Tcecarenko [31]

Recursion refers to the act of calling a function itself. With the use of this strategy, complex problems can be reduced to more manageable, simpler ones. Recursion might be a little challenging to comprehend. The best method to figure out how it works is to experiment with it.

<h3>How to write a programme by recursive method ?</h3>

The process of making a function call itself is known as recursion. With the use of this strategy, complex problems can be reduced to more manageable, simpler ones. Recursion might be a little challenging to comprehend. Experimenting with it is the most effective way to learn how it functions.

public class Recursive Calls {

public static void backwards Alphabet(char currLetter) {

if (currLetter == 'a') {

System.out.println(currLetter);

}

else {

System.out.print(currLetter + " ");

backwards Alphabet(--currLetter);

}

return;

}

public static void main (String [] args) {

char starting Letter = '-';

starting Letter = 'z';

// Your solution goes here

backwards Alphabet(starting Letter);

return;

}

}

To learn more about recursive method refer to :

brainly.com/question/24167967

#SPJ4

6 0
1 year ago
Write the output expression for a NOR gate with inputs , , and .​
mezya [45]

Answer:

Logic NOR Gate Equivalent

The Boolean expression for a logic NOR gate is denoted by a plus sign, ( + ) with a line or Overline, ( ‾‾ ) over the expression to signify the NOT or logical negation of the NOR gate giving us the Boolean expression of: A+B = Q.

4 0
2 years ago
1. Under what conditions can soils be chemically stabilized?
marshall27 [118]

Answer:

All will be Explained below.

Explanation:

1) Under which Condition can a soil be chemically Stabilize.

Answer

a). Plasticity Index :A soil with a high value of plasticity Index is not good for various engineering projects. The introduction of line helps in reducing plasticity due cation exchange reaction.Pozzolanic reaction over time reduces plasticity and increase index strength due to the formation of calcium - silicate hydrate.

7 0
3 years ago
For the following circuit diagram, if A=010 , B= 101.
Fantom [35]

Answer:

cgghhhh chick jjkkkkkki

4 0
3 years ago
Other questions:
  • OSHA does not approve individual states to have their own safety and health program.
    15·2 answers
  • A freshly annealed glass containing flaws of maximum length of 0.1 microns breaks under a tensile stress of 120 MPa. If a sample
    13·1 answer
  • Define ""acidity"" of an aqueous solution. How do you compare the strength of acidity of solutions ?
    6·1 answer
  • A piston having a diameter of 5.48 inches and a length of 9.50 in slides downward with a
    13·1 answer
  • The gas-turbine cycle of a combined gas–steam power plant has a pressure ratio of 8. Air enters the compressor at 290 K and the
    15·1 answer
  • 100 kg of refrigerant-134a at 200 kPa iscontained in a piston-cylinder device whose volume is 12.322 m3. The piston is now moved
    14·1 answer
  • Technician A says that reinforcements may be made of plastic.
    6·1 answer
  • Respond with TRUE if the symbol of the valve shown below is
    10·1 answer
  • Linus is using a calculator to multiply 5,426 and 30. He enters 5,426 x 300 by mistake. What can Linus do to correct his mistake
    7·1 answer
  • 14. The flow water in a 10-in Schedule 40 pipe is to be metered. The temperature of the water is
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!