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
8090 [49]
1 year ago
13

The Euclidean algorithm - The Euclidean algorithm provides a wonderful way to calculate the greatest common factor of 2 numbers.

The greatest common factor, which is the largest number that divides evenly into 1 or more numbers, is useful for reducing fractions. The Euclidean algorithm works by dividing 1 number by the other and finding the remainder. The 2 numbers are redefined, and then the process is repeated. The process ends when the remainder is equal to 0. Following is the pseudo code for the algorithm. In c++ Use 145 and 87 to test your program. The program will find the largest common factor of the numbers (the answer should be 29).
​
Computers and Technology
1 answer:
Murljashka [212]1 year ago
4 0

The pseudo-code of the algorithm will be:

Start

Set n1 equal to 145 and n2 equal to 87.

Divide n1 by n2 and find the remainder.

Set n1 equal to n2 and n2 equal to the remainder.

Repeat steps 2 and 3 until the remainder is equal to 0.

The greatest common factor is n1.

End

What do you mean by pseudocode?

In computer science, pseudocode is indeed a plain language description of a steps in an algorithm or similar system. Pseudocode frequently employs structural patterns of a conventional programming language, although it is designed for human interpretation rather than machine reading. It generally omits features necessary for computation of the algorithm, including such variable declarations and language-specific code. When possible, the programming language is supplemented by natural language description details or succinct mathematical notation.

To learn more about pseudocode

brainly.com/question/24735155

#SPJ9

You might be interested in
How can i clear the CMOS​
motikmotik

Explanation:

Steps to clear CMOS using the battery method

Turn off all peripheral devices connected to the computer.

Disconnect the power cord from the AC power source.

Remove the computer cover.

Find the battery on the board. ...

Remove the battery: ...

Wait 1–5 minutes, then reconnect the battery.

Put the computer cover back on.

4 0
3 years ago
Is backing up computer files done on the hard drive?
melomori [17]
Yes I believe so 

It should be acked up on the hard drive
7 0
3 years ago
1110011*110011 binary multiplication
Ganezh [65]

122113420121

Explanation:

8 0
3 years ago
Read 2 more answers
Structure for forloop?
solong [7]

Answer:

for ( initialization; condition;increment)

{

code goes here;

}

in python:

for i in list/range:

code with proper indentation

By initialization above we mean, like int i=0; etc.

By condition like i<10;

and by increment it means like i++, ++i or i+=1; etc

And in python, i can be an integer value if the range is mentioned, and it can be an item of a list if the list is used. We can also use an array, string and various other data structures in python. like we can have characters in a string and so on.

Explanation:

Please check the answer section.

8 0
3 years ago
When you are fit, you can exercise and do physical work without getting too tired. A. True B. False\
enot [183]

Answer:

A.

Explanation:

But all of us get tired

3 0
3 years ago
Read 2 more answers
Other questions:
  • Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
    9·1 answer
  • Remember to save _____ and be certain that you have your files saved before closing out.
    11·1 answer
  • Problem 1: Create a list that contains the months of the year. Problem 2: Create a loop to print the month number and name (do n
    7·1 answer
  • If you have a windows 8, but want the features of windows 8 pro, purchase and install _______.
    7·1 answer
  • Which is not an element of photography? a Cropping b Height c Directional Lighting d Framing
    11·1 answer
  • Web 2.0 has led to a shift just from consuming content towards what
    6·1 answer
  • When a formula contains the address of a cell, it is called a(n) ________.
    15·1 answer
  • A browser is used for creating Web pages. true or false?
    5·2 answers
  • In a finite state machine, state transitions happen only: a. When the reset causes a clock pulse on the D outputs of the flip-fl
    11·1 answer
  • Program a substitution cipher in Python. Create 2 functions one for encryption and the other for decryption ( get the text as th
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!