A student is tracing the following algorithm. The function INT gives the integer part of any number, eg INT(2.3) = 2 and INT (6.7) = 6. Line 10 Input A, B Line 20 Let C = INT(A ÷ B) Line 30 Let D = B × C Line 40 Let E = A – D Line 50 If E = 0 then go to line 90 Line 60 Let A = B Line 70 Let B = E Line 80 Go to line 20 Line 90 Print B Line 100 Stop Trace the algorithm in the case where the input values are: a) (i) A = 36 and B = 16; (ii) A = 11 and B = 7.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter4: Polynomial And Rational Functions
Section4.3: Zeros Of Polynomials
Problem 65E
icon
Related questions
Question
100%
A student is tracing the following algorithm. The function INT gives the
integer part of any number, eg INT(2.3) = 2 and INT (6.7) = 6.
Line 10 Input A, B
Line 20 Let C = INT(A ÷ B)
Line 30
Let D = B × C
Line 40
Let E = A – D
Line 50 If E = 0 then go to line 90
Line 60
Let A = B
Line 70
Let B = E
Line 80 Go to line 20
Line 90 Print B
Line 100 Stop
Trace the algorithm in the case where the input values are:
(a) (i) A = 36 and B = 16;
(ii) A = 11 and B = 7.
(b) State the purpose of the algorithm.
Transcribed Image Text:A student is tracing the following algorithm. The function INT gives the integer part of any number, eg INT(2.3) = 2 and INT (6.7) = 6. Line 10 Input A, B Line 20 Let C = INT(A ÷ B) Line 30 Let D = B × C Line 40 Let E = A – D Line 50 If E = 0 then go to line 90 Line 60 Let A = B Line 70 Let B = E Line 80 Go to line 20 Line 90 Print B Line 100 Stop Trace the algorithm in the case where the input values are: (a) (i) A = 36 and B = 16; (ii) A = 11 and B = 7. (b) State the purpose of the algorithm.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Paths and Circuits
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, advanced-math and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Mathematics For Machine Technology
Mathematics For Machine Technology
Advanced Math
ISBN:
9781337798310
Author:
Peterson, John.
Publisher:
Cengage Learning,