(1 point) Consider the algorithm: Algorithm Input: Two integers a and b. (1) if a > b then return a, b (2) return b, a What does the algorithm return when the input is a = 8 and b = -49 ? 26 What does the algorithm return when the input is a = 50 and b = 43 ? 26 What does the algorithm return when the input is a = -80 and b = 49 ? 26

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter10: Sequences, Series, And Probability
Section10.3: Geometric Sequences
Problem 22E
icon
Related questions
Question
100%
(1 point)
Consider the algorithm:
Algorithm
Input: Two integers a and b.
(1) if a > b then return a, b
(2) return b, a
What does the algorithm return when the input
is a = 8 and b = -49 ? 26
What does the algorithm return when the input
is a = 50 and b = 43 ? 26
What does the algorithm return when the input
is a = -80 and b = 49 ? 26
Transcribed Image Text:(1 point) Consider the algorithm: Algorithm Input: Two integers a and b. (1) if a > b then return a, b (2) return b, a What does the algorithm return when the input is a = 8 and b = -49 ? 26 What does the algorithm return when the input is a = 50 and b = 43 ? 26 What does the algorithm return when the input is a = -80 and b = 49 ? 26
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