Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the algorithm: Algorithm Input: Two integers a and b . ( 1 ) if a < b then return a ( 2 ) return

Consider the algorithm:
Algorithm
Input: Two integers a and b.
(1) if a < b then return a
(2) return b
What does the algorithm return when the input is a =100 and b =44?
What does the algorithm return when the input is a =14 and b =78?
What does the algorithm return when the input is a =34 and b =35?
What does the algorithm return when the input is a =67 and b =11?
What does the algorithm return ?
A. The minimum of a and b
B. The greatest common divisor of a and b
C. The maximum of a and b
D. The sum of a and b
E. The absolute value of a

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions

Question

What perspective or approach to talent would be appropriate?

Answered: 1 week ago